creating a pop-up in asp.net?
I wanted to create a 开发者_运维知识库pop-up with option buttons and textbox..
check my codes..
<form id="frmInsuranceCarrier" runat="server">
<div>Enter a New Insurance Carrier Code</div>
<div>
<asp:RadioButton ID="optAutoAssign" runat="server" />
Auto Assign</div>
<div>
<asp:RadioButton ID="optManual" runat="server" />
Manual</div>
<div>
<asp:TextBox ID="txtManual" runat="server"></asp:TextBox>
</div>
<asp:Button ID="cmdOk" runat="server" Text="Ok" onclick="cmdOk_Click" />
<asp:Button ID="cmdCancel" runat="server" Text="Cancel"
onclick=
"cmdCancel_Click" />
there's not much code here in dealing with a popup : ) Do you want an ajax modal popup? in that case check out: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx
Jquery model is a good choice.
How to use jquery dialog in asp.net
jQuery UI Dialog
you can use the RegisterStartupScript
to execute every javascript/jQuery Code Serverside
public void AnyButton_Click(Object sender, EventArgs e)
{
string script = "$('#theid').dialog('open');";
ClientScript.RegisterStartupScript(GetType(), "popup", script, true);
}
精彩评论