如何在数据列表中单击按钮以加载modalpopup [英] How to load modalpopup with button click inside datalist
本文介绍了如何在数据列表中单击按钮以加载modalpopup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我有一个带有按钮的数据列表控件.当我单击数据列表控件中的按钮时,应该出现模式弹出窗口.可以使用Ajax进行Modalpopupextender.
谁能帮我.
问候
Froxy
Hi All
I have a datalist control which has button. When i click the button in the datalist control there should be modal popup. It can be Modalpopupextender using Ajax.
Can anyone help me.
Regards
Froxy
推荐答案
看看这个
http://blackmarketserver.com/博客/2011/02/16/show-a-modalpopupextender-from-a-button-inside-a-gridview-control [
Look at this
http://blackmarketserver.com/blog/2011/02/16/show-a-modalpopupextender-from-a-button-inside-a-gridview-control[^]
这是一种解决方案..
Here Is One Solution..
protected void Button1_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}
签出这个...
Check Out This...
<asp:panel id="Panel1" runat="server" height="300px" width="500px" xmlns:asp="#unknown">
style="background-color: #CC33FF" >
<asp:panel id="Panel2" runat="server" height="30px" width="500px">
style="background-color: #3399FF; cursor:move" >
<asp:button id="btn_Ok" runat="server" text="Ok" />
<asp:button id="btn_Cancel" runat="server" text="Cancel" />
<asp:modalpopupextender id="ModalPopupExtender1" xmlns:asp="#unknown">
runat="server"
TargetControlID="LinkButton1"
PopupControlID="Panel1"
PopupDragHandleControlID="Panel2"
OkControlID="btn_Ok"
CancelControlID="btn_Cancel"
DropShadow="true">
<br />
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton
<br />
<asp:button id="Button1" runat="server" text="Button1" onclick="Button1_Click" />
protected void Button1_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}
这篇关于如何在数据列表中单击按钮以加载modalpopup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文