我有一个gridview,其中有一些列和查看详细信息链接按钮。我想打开一个弹出窗口,其中包含另一个包含一些详细信息的gridview。为此,我将商店编号作为命令参数从查看详细信息链接按钮传递。但是问题是弹出窗口正在打开,但服务器端事件 LinkViewDetail_Command 没有被调用,因为 gridview 没有显示任何内容。建议我对此代码进行一些修改或其他方式吗?
<asp:TemplateField HeaderText="View Detail" >
<ItemTemplate>
<asp:LinkButton ID="LinkButtonViewDetail" Text="View" runat="server" CommandArgument='<%#Eval("StoreNumber").ToString()%>' OnCommand="LinkViewDetail_Command"/>
<ajax:ModalPopupExtender runat ="server" ID="ModalPopupWarning"
TargetControlID="LinkButtonViewDetail"
PopupControlID="PanelPopUp"
CancelControlID="ButtonCancel"
></ajax:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
Public Sub LinkViewDetail_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Try
GridViewViewNewStoreTransitionStore.DataSource = m_DataAccess.GetFinalStoreCloseAcquisition(CInt(e.CommandArgument))
GridViewViewNewStoreTransitionStore.DataBind()
Catch ex As Exception
Common.WriteLog(ex)
Response.Redirect("..\Errors.aspx", False)
End Try
End Sub