2012年6月27日

FreeTextBox使用

摘要: 使用FreeTextBox控件时,需要在页面中设置ValidateRequest="false",如果运行报错的话,还需要在配置文件<System.Web>标签下添加<pages pageBaseType="System.Web.UI.Page" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> <httpRuntime requestValidationMode="2.0"maxR 阅读全文

posted @ 2012-06-27 17:44 若灵思源 阅读(136) 评论(0) 推荐(0) 编辑

使用Ajax Web.config配置

摘要: 如果用IIS6发布,需要在<System.Web>标签中添加下面代码,如果是在IIS7中发布网站,则需要在<System.WebServer>标签中添加<httpHandlers><add verb="POST,GET" path="ajaxpro/*.ashx"type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/></httpHandlers> 阅读全文

posted @ 2012-06-27 17:43 若灵思源 阅读(117) 评论(0) 推荐(0) 编辑

GridView导出Excel

摘要: 首先要重载VerifyRenderingInServerForm方法,否则会报“GridView要在有run=server的From体内”的错。public override void VerifyRenderingInServerForm(Controlcontrol){// Confirms that an HtmlForm control is rendered for}protected void btnExport_Click(object sender, EventArgs e){string vOutputName = lblTitle2.Text.Trim();//Excel. 阅读全文

posted @ 2012-06-27 17:42 若灵思源 阅读(146) 评论(0) 推荐(0) 编辑

导航