开发者

creating a pop-up in asp.net?

开发者 https://www.devze.com 2023-02-28 13:05 出处:网络
I wanted to create a 开发者_运维知识库pop-up with option buttons and textbox.. check my codes..

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" />
    &nbsp;Auto Assign</div>
    <div>
        <asp:RadioButton ID="optManual" runat="server" />
    &nbsp;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);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消