Ext.Net web.config全局属性配置
来源:互联网 发布:淘宝乔丹好店铺 编辑:程序博客网 时间:2024/06/06 11:45
WEB.CONFIG 配置例子
如何让EXT.NET支持视图变量ViewState
根据以上的说明,我们可以对 EXT.NET 进行很多配置。
比如,让 EXT.NET 支持视图变量。默认情况下,EXT.NET不保存页面变量,但是可以通过配置EXT.NET改变这点,毕竟有时使用ViewState还是挺方便的。
WEB.CONFIG配置
- <configuration>
- <configSections>
- <section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" ></section>
- </configSections>
- <extnet ajaxViewStateMode="Enabled" />
- </configuration>
- <httpHandlers>
- <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
- </httpHandlers>
例子
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="AM.Web.Pages.Test" %>
- <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <ext:ResourceManager ID="ResourceManager1" runat="server" />
- <ext:Button ID="Button1" runat="server" OnDirectClick="Button1_Click" Text="ViewState">
- </ext:Button>
- <ext:TextField ID="TextField1" runat="server" Text="">
- </ext:TextField>
- </form>
- </body>
- </html>
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using Ext.Net;
- namespace AM.Web.Pages
- {
- public partial class Test : System.Web.UI.Page
- {
- public string myStr
- {
- get
- {
- if (this.ViewState["myStr"] == null)
- {
- return string.Empty;
- }
- return this.ViewState["myStr"].ToString();
- }
- set
- {
- this.ViewState["myStr"] = value;
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!X.IsAjaxRequest)
- {
- myStr = "AAAAAAAAAAAAAAAAAAAAAA";
- }
- }
- protected void Button1_Click(object sender, DirectEventArgs e)
- {
- this.TextField1.Text = myStr;
- }
- }
- Ext.Net web.config全局属性配置
- EXT.NET_WEB.CONFIG 全局配置属性
- Ext.Net GridPanel属性配置
- asp.net mvc 3 配置全局异常处理 Web.config中设置CustomError
- Java web.xml session-config 属性配置
- Java web.xml session-config 属性配置
- Java web.xml session-config 属性配置
- Java web.xml session-config 属性配置
- ASP.NET动态配置web.config文件
- ASP.Net 2.0的Web.config配置
- asp.net中web.config配置详解
- [转]ASP.NET Web.config配置详解
- ASP.NET web.config配置大全
- Asp.net中的web.config配置
- asp.net权限控制配置web.config
- ASP.NET web.config配置大全
- asp.net web.config配置节说明
- Asp.net中的web.config配置
- JavaScript 判断浏览器类型函数
- 编程开发常见错误分类与解析
- 获取CRichEditCtrl控件中的格式信息,将格式保存在容器中
- UDP 程序设计
- 嵌入式系统程序可移植性设计及性能优化之一――宏定义设计
- Ext.Net web.config全局属性配置
- 画一个实线的table
- centos中安装rpm/yum
- 尚学堂Java学习笔记
- WinCE桌面助手-远程控制工具
- iOS5:[UIDevice uniqueIdentifier]的替代方案
- 清华大学计算中心培训部-技术分享:java入门教程:Hello world程序
- VC 判断左右"Control"键是否被按下
- 销售管理如何处理好分支机构管理问题