我有这个链接按钮:
<asp:ButtonColumn Text="Return to Clinic" ItemStyle-CssClass="btnLinkBtn" ButtonType="LinkButton" CommandName="Return" HeaderText="Action">
<ItemStyle HorizontalAlign="Center" Width="30px"/>
<HeaderStyle HorizontalAlign="Center" Width="30px"/>
</asp:ButtonColumn>
背后的代码是:
Protected Sub dgRequests_ItemCommand(source As Object, e As DataGridCommandEventArgs) Handles dgRequests.ItemCommand
Try
If e.CommandName = "Return" Then
divReturnToClinicPanel.Visible = True
divContent.Visible = False
' More code here
End If
Catch ex As Exception
' ...
Finally
' ...
End Sub
问题是第一次点击不会触发任何内容,只会触发第二次点击。可能是什么问题?