现在的位置: 首页 > 综合 > 正文

Ext.Window窗口下onclick=”Button1_Click”,不能提交的问题

2012年11月26日 ⁄ 综合 ⁄ 共 2107字 ⁄ 字号 评论关闭

 原文地址: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 Button1_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:
"Window1_Content",
                collapsible: 
true,
                bodyStyle:
"padding: 6px;",
                renderTo: 
"form1"
            });
            Window1.show();
            Window1.setPosition(
200200);
        });
    
</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="Window1_Content">
            
<asp:TextBox ID="TextBox1" runat="server" /><br />
            
<asp:Button runat="server" id="Button1" Text="submit" onclick="Button1_Click" />
        
</div>
        
    
</form>
</body>
</html>

抱歉!评论已关闭.