The. aspx code is as follows:
<%@ page language= "C #" autoeventwireup= "true" codefile= "Popup.aspx.cs" inherits= "LESSON_CODE_DEFAULT2"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title></title>
<style type = "Text/css" >
. pnlpopup {padding:10px; border:1px solid gray; Background-color: #eaeaea;}
</style>
<body>
<form id= "Form1" runat= "Server" >
<div>
<myatk:toolkitscriptmanager id= "ToolkitScriptManager1" runat= "Server" >
</myatk:toolkitscriptmanager><%--the necessary--%>
<asp:textbox id= "TextBox1" runat= "Server" ></asp:TextBox>
<myatk:popupcontrolextender id= "Textbox1_popupcontrolextender" runat= "Server"
Dynamicservicepath= "" enabled= "True" extendercontrolid= ""
Targetcontrolid= "TextBox1"
Popupcontrolid= "Panel1"
position= "Bottom"
><%--targetcontrolid= "TextBox1" Control party
Popupcontrolid= "Panel1" pop-up party
Position= the meaning of the three attributes of "Bottom" is to understand--%>
</myatk:PopupControlExtender>
<asp:panel id= "Panel1" runat= "server" CssClass = "Pnlpopup" >
<p> static pop-up layer </p>
<asp:updatepanel id= "UpdatePanel1" runat= "Server" updatemode= "Conditional" >
<ContentTemplate>
<asp:radiobuttonlist id= "rblist_1" runat= "Server" autopostback= "True"
onselectedindexchanged= "Rblist_1_selectedindexchanged" >
<asp:listitem >111</asp:ListItem>
<asp:listitem >222</asp:ListItem>
<asp:listitem >333</asp:ListItem>
<asp:listitem >444</asp:ListItem>
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div>
</form>
</body>
The. Aspx.cs code is as follows:
Using system;using system.collections.generic;using system.linq;using system.web;using System.Web.UI;using System.web.ui.webcontrols;public partial class lesson_code_default2:system.web.ui.page{ protected void Page_ Load (object sender, EventArgs e) { } protected void Rblist_1_selectedindexchanged (object sender, EventArgs e) { textbox1_popupcontrolextender.commit (rblist_1.selectedvalue);//method of building return value Commit }}
The effect is as follows:
Research on ASP. NET pop-up layer extension