Today, I just used Atlas to implement a simple function. The following code is as follows.
Atlascontroltoolkit. dll and Microsoft. Web. Atlas. dll are used.
ASPX page code:
<PC3: scriptmanager id = "scriptmanager1" runat = "server"> // enablepartialrendering = true is easy to add. An unknown error prompt box is displayed when the page is refreshed.
</PC3: scriptmanager>
// Control the detected Control
<Atlastoolkit: modalpopupextender id = "modalpopupextender1" runat = "server">
<Atlastoolkit: modalpopupproperties targetcontrolid = "buttonsave" popupcontrolid = "panel10" placement = "modalbackground" dropshadow = "true" okcontrolid = "okbutton" onokscript = "onok () "cancelcontrolid =" cancelbutton "/>
</Atlastoolkit: modalpopupextender>
// The pop-up dialog box
<Asp: Panel id = "panel10" runat = "server" cssclass = "modalpopup" Height = "50px" width = "255px">
<Asp: textbox id = "textbox1" runat = "server" Height = "121px" textmode = "multiline" width = "238px"> </ASP: textbox> & nbsp;
<Br/>
<Asp: button id = "okbutton" runat = "server" text = "approved" width = "62px"/>
<Asp: button id = "cancelbutton" runat = "server" text = "return" width = "61px"/>
</ASP: Panel>
<SCRIPT type = "text/JavaScript">
Function onok (){
_ Dopostback ('buttonok', ''); // call a button event in the background.
}
</SCRIPT>
<Script language = "JavaScript" type = "text/JavaScript"> // executes background events.
Function _ dopostback (eventtarget, eventargument ){
If (! Theform. onsubmit | (theform. onsubmit ()! = False )){
Theform. _ eventtarget. value = eventtarget;
Theform. _ eventargument. value = eventargument;
Theform. Submit ();
}
}
</SCRIPT>
// Css file Style
/* Modal popup */
. Modalbackground {
Background-color: Gray;
Filter: alpha (opacity = 70 );
Opacity: 0.7;
}
. Modalpopup {
Background-color: # ffffdd;
Border-width: 3px;
Border-style: solid;
Border-color: Gray;
Padding: 3px;
Width: 250px;
}