Extjs的布局中,不能用asp.net控件么?
Extjs的布局中,不能用asp.net控件么?
我刚学习Extjs中,在某块里面放asp.net服务器控件作为查询功能,可是点击查询的时候获取不到文本框的内容,去掉Extjs框架代码就行了,请问这是怎么回事?
谁有实例?
代码如下:
<script language="javascript" type="text/javascript">
/*ViewPort:代表整个浏览器显示区域,该对象渲染到页面的body区域,并且会随着浏览器显示区域大小而自动改变;
一个页面只能有一个viewport实例;
主要应用于应用程序的主界面;
常用的布局有fit,border等;
*/
/*基础的viewport*/
function createViewPort() {
new Ext.Viewport({
enableTabScroll: true,
layout: "fit",
items: [{ title: "管易后台管理系统", html: "内容", bbar: [{ text: "注销" }, { text: "关闭"}]}]
})
}
function createViewPortFuZa() {
new Ext.Viewport({
enableTabScroll: true,
layout: "border",
items: [{ title: "面板", region: "north", contentEl: "north", height: 50, html: "<h1>网站后台管理系统</h1>" },
{ title: "菜单", region: "west", width: 200, contentEl: "west", collapsible: true, html: "菜单栏" },
{ xtype: "tabpanel", region: "center", contentEl: "center", items: [{ title: "面板1", html: "内容1" }, { title: "面板2", html: "内容2"}] }
]
})
}
Ext.onReady(function() {
createViewPortFuZa();
//Ext.get("Btn_ViewPort").on("click", createViewPort);
//Ext.get("Btn_ViewPort_FuZa").on("click", createViewPortFuZa);
})
</script>
<body>
<form id="form1" runat="server">
<div id="center" style="width:100%; height:200px; background-color:Gray">
<table align="center">
<tr>
<td>
<input id="Btn_ViewPort" type="button" value="createViewPort" />
</td>
<td>
<input id="Btn_ViewPort_FuZa" type="button" value="createViewPortFuZa" />
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
</td>
</tr>
</table>
</div>
<div id="west">
</div>
<div id="north">
</div>
<div id="divResult">
</div>
</form>
------解决方案--------------------
Extjs 最好 不要用 asp.net 控件