日期:2014-05-17 浏览次数:20490 次
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="1" onclick="LinkButton1_Click">LinkButton</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="2" onclick="LinkButton1_Click">LinkButton</asp:LinkButton> <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="3" onclick="LinkButton1_Click">LinkButton</asp:LinkButton> </ContentTemplate> </asp:UpdatePanel>
------解决方案--------------------
ModalPopupExtender1.Show();
------解决方案--------------------
你是通过点击GridView中的按钮来弹出ModalPopupExtender吗
------解决方案--------------------
[code=C#][/code]
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Reject")
{
int rowIndex = ((GridViewRow)(((Button)(e.CommandSource)).Parent.Parent)).RowIndex;
ModalPopupExtender2.Show();
ModalPopupExtender1.Hide();
}
if (e.CommandName == "Detail")
{
ModalPopupExtender1.Show();
ModalPopupExtender2.Hide();
BindModalUp(e.CommandArgument.ToString());//自定义方法绑定数据,传参数
}
}