Original address: http://extjs.com/forum/showthread.php? T = 15302 & Highlight = runat + window + ASP. NET & page = 2
<% @ Page Language = " C # " %>
<!Doctype HTML public"-// W3C // dtd xhtml 1.0 transitional // en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< Script runat = " Server " >
Protected Void Button#click ( Object Sender, eventargs E)
{
This . Label1.text = " You entered: " + This . Textbox1.text;
}
</ Script >
< HTML xmlns = " Http://www.w3.org/1999/xhtml " >
< Head ID = " Head1 " Runat = " Server " >
< Title > EXT window with PostBack support </ Title >
< Link href = " Extjs/resources/CSS/ext-all.css " REL = " Stylesheet " Type = " Text/CSS " />
< Script SRC = " Extjs/adapter/EXT/ext-base.js " Type = " Text/JavaScript " > </ Script >
< Script SRC = " Extjs/ext-all.js " Type = " Text/JavaScript " > </ Script >
< Script Type = " Text/JavaScript " >
Ext. onready (function (){
VaR window1 = New Ext. Window ({
ID: " Window1 " ,
Title: " Window1 " ,
Height: 100 ,
Width: 200 ,
Autoshow: True ,
Contentel: " Windowcemcontent " ,
Collapsible: True ,
Bodystyle: " Padding: 6px; " ,
Renderto: " Form1 "
});
Window1.show ();
Window1.setposition ( 200 , 200 );
});
</ Script >
< Style Type = " Text/CSS " >
/* The following styles are only required if not using. setposition */
/* Body
{
Overflow: hidden;
Margin: 0;
Padding: 0;
Border: 0px none;
}
HTML, body
{
Height: 100%;
} */
</ Style >
</ Head >
< Body >
<! -- The following form style attributes are only required If Not Using . Setposition -->
<! -- Style = " Width: 100%; Height: 100%; " -->
< Form ID = " Form1 " Runat = " Server " >
< ASP: Label ID = " Label1 " Runat = " Server " />
< Div ID = " Windowcemcontent " >
< ASP: textbox ID = " Textbox1 " Runat = " Server " /> < BR />
< ASP: button runat = " Server " ID = " Button1 " Text = " Submit " Onclick = " Button#click " />
</ Div >
</ Form >
</ Body >
</ Html >