一、<wbr><wbr><wbr><wbr><wbr><wbr> 转4.0 Web应用程序步骤... 1</wbr></wbr></wbr></wbr></wbr></wbr>
1.1<wbr><wbr><wbr><wbr><wbr> 转换... 1</wbr></wbr></wbr></wbr></wbr>
1.2<wbr><wbr><wbr><wbr><wbr> 关于TreeView的修改... 1</wbr></wbr></wbr></wbr></wbr>
1.3<wbr><wbr><wbr><wbr><wbr> 替换工作... 2</wbr></wbr></wbr></wbr></wbr>
1.4<wbr><wbr><wbr><wbr><wbr> 关于ReadOnly的修改... 3</wbr></wbr></wbr></wbr></wbr>
1.4.1<wbr><wbr><wbr><wbr><wbr><wbr> 发现的现象... 3</wbr></wbr></wbr></wbr></wbr></wbr>
1.4.2<wbr><wbr><wbr><wbr><wbr><wbr> 怎么修改... 4</wbr></wbr></wbr></wbr></wbr></wbr>
1.5<wbr><wbr><wbr><wbr><wbr> Web.config. 5</wbr></wbr></wbr></wbr></wbr>
1.5.3<wbr><wbr><wbr><wbr><wbr><wbr> globalization. 6</wbr></wbr></wbr></wbr></wbr></wbr>
1.5.4<wbr><wbr><wbr><wbr><wbr><wbr> 验证... 6</wbr></wbr></wbr></wbr></wbr></wbr>
1.6<wbr><wbr><wbr><wbr><wbr> 列表布局... 6</wbr></wbr></wbr></wbr></wbr>
1.7<wbr><wbr><wbr><wbr><wbr> 为ajax做准备... 7</wbr></wbr></wbr></wbr></wbr>
1.8<wbr><wbr><wbr><wbr><wbr> Qwin.js. 9</wbr></wbr></wbr></wbr></wbr>
1.9<wbr><wbr><wbr><wbr><wbr> 验证控件... 9</wbr></wbr></wbr></wbr></wbr>
1.10<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 可以不做,最好做... 9</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.10.1<wbr><wbr><wbr><wbr> 把常用类加入新的Dll 9</wbr></wbr></wbr></wbr>
1.10.2<wbr><wbr><wbr><wbr> 日志和调试Log4net 9</wbr></wbr></wbr></wbr>
1.10.3<wbr><wbr><wbr><wbr> Ajax选择器,弹出的时候比别的慢... 10</wbr></wbr></wbr></wbr>
1.11<wbr><wbr><wbr><wbr> 关于Vss. 10</wbr></wbr></wbr></wbr>
二、<wbr><wbr><wbr><wbr><wbr><wbr> 如果转为网站看看这里... 10</wbr></wbr></wbr></wbr></wbr></wbr>
三、<wbr><wbr><wbr><wbr><wbr><wbr> Ajax应用看看这里... 12</wbr></wbr></wbr></wbr></wbr></wbr>
一、<wbr><wbr><a name="_Toc318707616">转4.0 Web</a>应用程序步骤</wbr></wbr>
1.1<wbr><wbr><wbr><wbr> 转换</wbr></wbr></wbr></wbr>
先转vs2010,转换为web应用程序,再把 .resx 的文件删除,再把“Bsdqpqx.csproj”里的类似这样的
<wbr><EmbeddedResource Include="Zzcx\ZhuangPeiShow.aspx.resx"></wbr>
<wbr><wbr><wbr><wbr><wbr> <DependentUpon>ZhuangPeiShow.aspx.cs</DependentUpon></wbr></wbr></wbr></wbr></wbr>
</EmbeddedResource>
全部删除
1.2<wbr><wbr><wbr><wbr> 关于TreeView</wbr></wbr></wbr></wbr>的修改
<wbr><wbr><wbr><wbr><wbr><wbr> 对于*.aspx;*.cs文件,选上全字匹配</wbr></wbr></wbr></wbr></wbr></wbr>
1)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 建议依然引用原来的微软自带的控件TreeView 和 TreeNode和TreeNodeCollection,原来的命名空间加上前缀<wbr><wbr> Microsoft.Web.UI.WebControls.TreeView</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
2)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> iewc:Microsoft.Web.UI.WebControls.TreeView 替换为 iewc:TreeView</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
3)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> lb_top == "Microsoft.Web.UI.WebControls.TreeNode" 替换为 lb_top == "TreeNode"</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
1.3<wbr><wbr><wbr><wbr> 替换工作</wbr></wbr></wbr></wbr>
1)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> msg = msg; 替换为"";</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
2)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 添加引用“Configuration”</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
3)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> ConfigurationSettings 替换为 ConfigurationManager</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
4)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> IsStartupScriptRegistere<wbr>d 替换为ClientScript.IsStartupScriptRegistere<wbr>d</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
5)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> RegisterStartupScript 替换为ClientScript.RegisterStartupScript this.GetType()</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
6)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> GetPostBackEventReferenc<wbr>e 替换为 ClientScript.GetPostBackEventReferenc<wbr>e</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
7)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 用工具将未自动转(datagrid和分页控件)的事件转过去,工具“转换DataGrid_aspnetPager事件工具”,然后全局检查void InitializeComponent() 对不对,如果有打不开的页面方法:直接改文件中的类名+”1”</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
8)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 将cs 文件中,private 都替换为 protected</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
9)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 分页控件,要换成“AspNetPager732DLL.rar”,删除原来的引用,换成这个</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
10)<wbr><wbr><wbr><wbr> cs文件中Wuqi.Webdiyer.PageChangedEventArgs 替换为 System.EventArgs;</wbr></wbr></wbr></wbr>
11)<wbr><wbr><wbr><wbr> cs文件中 int currPageIndex=e.NewPageIndex; 替换为 ""</wbr></wbr></wbr></wbr>
12)<wbr><wbr><wbr><wbr> cs文件中 AspNetPager1.CurrentPageIndex = currPageIndex; 替换为""</wbr></wbr></wbr></wbr>
13)<wbr><wbr><wbr><wbr> cs文件中 BindDataList(currPageIndex 替换为 BindDataList(AspNetPager1.CurrentPageIndex</wbr></wbr></wbr></wbr>
14)<wbr><wbr><wbr><wbr> pubfunc.cs中</wbr></wbr></wbr></wbr>
a)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.CustomInfoText 替换为AspNetPager.CustomInfoHTML,</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
b)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> InputBox 替换为PageIndexBox</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
c)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> CustomInfoText 替换为 CustomInfoHTML</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
d)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> CustomInfoHTMLAlign 替换为 CustomInfoTextAlign</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
e)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> SetPageSizeCss 增加</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
a)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.FirstPageText = "<font face="webdings">9</font>";</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
b)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.LastPageText = "<font face="webdings">:</font>";</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
c)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.PrevPageText = "<font face="webdings">3</font>";</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
d)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.NextPageText = "<font face="webdings">4</font>";</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
e)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> AspNetPager.LayoutType = Wuqi.Webdiyer.LayoutType.Table;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
15)<wbr><wbr><wbr><wbr> AspNetPager.PageIndexBoxType=Wuqi.Webdiyer.PageIndexBoxType.DropDownList;</wbr></wbr></wbr></wbr>
16)<wbr><wbr><wbr><wbr> freetextbox 在设计界面出错,但不影响运行</wbr></wbr></wbr></wbr>
17)<wbr><wbr><wbr><wbr> 当有中文的时候报脚本错误,是因为 js 文件本身不是utf-8格式的,转成即可用转换工具“E:\work\2007-1-30After\Source\软件移植功能,文档\1.0转2.0\转换DataGrid_aspnetPager事件工具\bin\Debug\TextReplace.exe”</wbr></wbr></wbr></wbr>
修改方法的文件,先把baseModels,rptModels,rptStructs这3个文件夹剪切出去,再替换 js aspx,cs htc
<wbr>Encoding.GetEncoding("gb2312")</wbr>
<wbr> 在qkeyin.cs 中搜索gb2312 改为 utf-8</wbr>
error.aspx
<wbr><wbr> strErrorMessage 判断下 strErrorMessage == null</wbr></wbr>
<wbr><wbr> public static string strErrorMessage=""</wbr></wbr>
<wbr></wbr>
18)<wbr><wbr><wbr><wbr> Qwinpanel.aspx的#6e94c5 改为 white</wbr></wbr></wbr></wbr>
19)<wbr><wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr>
37.dgList$ctl04$lbtnKehu 选择器全选报错
<wbr> 1.<wbr> __ctl2 应换为 _ctl02</wbr></wbr>
<wbr><wbr><wbr><wbr> __ctl"+i 替换为</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> __ctl"+String(i) 替换为 _ctl" + (parseInt(i,10) < 10 ? "0" + String(parseInt(i,10)) : String(i))</wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr> __ctl"+String(index) 替换为 _ctl" + (parseInt(index,10) < 10 ? "0" + String(parseInt(index,10)) : String(index))</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> $_ctl" + String(index)<wbr> 替换为 $ctl" + (parseInt(index,10) < 10 ? "0" + String(parseInt(index,10)) : String(index))</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr> __ctl"+HangHao 替换为</wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr> __ctl"+String(HangHao) 替换为 _ctl" + (parseInt(HangHao,10) < 10 ? "0" + String(parseInt(HangHao,10)) : String(HangHao))</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> JScriptFuncMoveCursor.js 特殊处理</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> var id = objId.replace(HangHao,String(parseInt(HangHao) + 1)); 替换为</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> var HangHao1 = String(parseInt(HangHao,10) + 1);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> HangHao1 = (parseInt(HangHao1,10) < 10 ? "0" + String(parseInt(HangHao1,10)) : String(HangHao1)) ;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> var id = objId.replace(HangHao, HangHao1);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> var id = objId.replace(HangHao,String(parseInt(HangHao) - 1)); 替换为</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> var HangHao1 = String(parseInt(HangHao,10) + 1);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> HangHao1 = (parseInt(HangHao1,10) < 10 ? "0" + String(parseInt(HangHao1,10)) : String(HangHao1));</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> var id = objId.replace(HangHao, HangHao1);</wbr></wbr></wbr></wbr>
1.4<wbr><wbr><wbr><wbr> 关于ReadOnly</wbr></wbr></wbr></wbr>的修改
1.4.1<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 发现的现象</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
A.当界面中如果有readonly 为 true 的控件或者在后台把文本框的 readonly=true 赋值为 true 那么后台取不到前台改变的文本框的值,
<wbr><wbr><wbr> B.改为 txtKehu_dm.Attributes.Add( "readonly",<wbr><wbr> "true") 这种方式给在后台修改只读后,可以在后台取到值,但是又不能通过后台readonly=false 和 Attributes.Add( "readonly",<wbr><wbr> "false"),这2中方式改变控件为不只读,前台readOnly=false修改为不只读后,后台依然取不到值,</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> C.所以对于后台用readonly=true 的情况,都要这样解决,前台的ReadOnly属性改为false,后台的readonly=true改为.Attributes.Add("ContentEditable", "false");或者Add("readonly", "true");<wbr> 而readonly=false 改为.Attributes.Add("ContentEditable", true);前台使用这个属性也可以ContentEditable。</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> D.以后最好还是前台控制文本框的只读</wbr></wbr></wbr>
1.4.2<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><a name="_Toc318707622">怎么修改</a></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> 对于咱们现在的版本按下面的修改吧</wbr></wbr></wbr>
<wbr><wbr><wbr> 所有cs文件中的readonly都要用 txtKehu_dm.Attributes.Add("readonly", "true");//代替readonly,不要用readonly了以便后台可以取;txtKehu_dm.ReadOnly =true;和txtKehu_dm.ReadOnly=true;注意等号左右的空格 这句保存的时候会出错应改为(2.0以后的版本,1.1的没事) txtKehu_dm.Attributes.Add( "readonly",<wbr><wbr> "true")<wbr><wbr><wbr><wbr> txtKehu_no.ReadOnly = true;和txtKehu_no.ReadOnly = true;注意等号左右的空格 这句保存的时候会出错应改为(2.0以后的版本,1.1的没事) txtKehu_no.Attributes.Add( "readonly",<wbr><wbr> "true")</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><b>洗车单特殊处理<wbr></wbr></b></wbr></wbr></wbr>
<wbr><wbr><wbr> ChangePageState 函数里的 PubFunc.setTextBox(Page,true,false)改为PubFunc.setTextBox(Page,false,false)</wbr></wbr></wbr>
<wbr><wbr><wbr> 然后在ChangeMenu函数里加上</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtKehu_no.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>txtCard_kind.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtCard_enddate.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtCard_lx.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtCard_cs.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtCard_useje.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtCard_leftje.ReadOnly = true;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><b><wbr></wbr></b><b>对于销售单,销退单等单据上的</b> <b>统一替换</b>ReadOnly=True ForeColor="DarkGray" 和ForeColor="DarkGray" ReadOnly=True 为 contentEditable="false" ForeColor="DarkGray"<wbr><wbr><wbr><wbr> 用再正则表达式搜索检查漏掉的</wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> \<asp\:TextBox[^)]+ReadOnly[^)]+text='\<%# 搜索,结果1个1个修改吧 ReadOnly =true 的要改为 contentEditable="false"</wbr></wbr></wbr>
<wbr><wbr><wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><b><wbr></wbr></b><b>对于新建会员卡</b>cardedit.aspx,选择车辆,界面上的txtChe_no ReadOnly =true 的要改为 contentEditable="false",后台bindText</wbr></wbr>
<wbr><wbr><wbr> else if (sState == "new")<wbr><wbr> txtChe_no.ReadOnly = true;这句屏蔽</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr> if (sState == "edit")</wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr> 加上<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtChe_no.ReadOnly = false;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
}
<wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><b>对于 WxHuiFangDanNew</b> <b>界面</b> , 这些文本框的只读属性去掉,ispostback 增加下面的代码</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> //qzf 2012-2-29</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtkehu_mc.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtKehu_xm.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtkehu_dh.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtwork_no.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtwork_rq.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> txtche_no.Attributes.Add("readonly", "true");</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><b><wbr><wbr></wbr></wbr></b><b>对于 KhGyshRelateSearch.aspx</b> txtKehu_no 和 txtGys_no的只读去掉</wbr>
<wbr></wbr>
对于ZhuangPei.aspx 去掉 OnPageIndexChanged="dgList_PageIndexChanged"
对于YeJi/yuangong.aspx<wbr> ddlGZRY.SelectedIndex = 0 改为 if (ddlGZRY.Items.Count>0)ddlGZRY.SelectedIndex = 0;</wbr>
对于WxHuiFangTiXing.aspx dgList_ItemCommand kehu_mc参数加encode
<wbr><wbr> PubFunc.jsShowModal("WxHuiFangDanNew.aspx?kehu_mc=" + Server.UrlEncode(strKehu_mc) + "&Kehu_xm=" + Server.UrlEncode</wbr></wbr>
(strKehu_xm) + "&kehu_dh=" + Server.UrlEncode(strkehu_dh) + "&work_no=" + strwork_no + "&work_rq=" + strwork_rq + "&che_no="
+ Server.UrlEncode(strche_no), "", 510, 560);
<wbr></wbr>
<wbr></wbr>对于<wbr> WxHuiFangDanNew.aspx</wbr> 接收kehu_mc 改为decode
对于拆装文件夹下4个查询<wbr> ,BindDdl 里的函数<wbr> PubFunc.BindGongSiDeptJb(ddlGongSi,null, null);改为</wbr></wbr>
<wbr><wbr><wbr><wbr> PubFunc.BindGongSiDeptJb(ddlGongSi, ddlDept_mc, ddlJb);<wbr></wbr></wbr></wbr></wbr></wbr>
对于BtnBehavior.htc 的引用他的地方去掉吧
1.5<wbr><wbr><wbr><wbr> Web.config</wbr></wbr></wbr></wbr>
1.5.1<wbr><wbr><wbr><wbr><wbr><wbr><wbr> web.config</wbr></wbr></wbr></wbr></wbr></wbr></wbr> 解决微软大数据提交出错的问题
<wbr><appSettings></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> <add key="aspnet:MaxHttpCollectionKeys" value="5000" /></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> </appSettings></wbr></wbr></wbr></wbr></wbr>
支持 2.0 的类库
<startup useLegacyV2RuntimeActiva<wbr>tionPolicy="true"></wbr>
<wbr><wbr><wbr> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></wbr></wbr></wbr>
<wbr><wbr><wbr> <requiredRuntime version="v1.1.4322"/></wbr></wbr></wbr>
</startup>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
1.5.2<wbr><wbr><wbr><wbr><wbr><wbr><wbr> web.config</wbr></wbr></wbr></wbr></wbr></wbr></wbr> 解决ajax回发出脚本提示的问题。
<wbr><pages validateRequest="false" enableEventValidation="false" ></wbr>
<compilation defaultLanguage="c#" debug="true" targetFramework="4.0">
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> <assemblies><add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral,</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
PublicKeyToken=31bf3856ad364e35"/></assemblies></compilation>
<wbr></wbr>
<wbr> 去掉authentication</wbr>
<wbr> 去掉 trace</wbr>
<wbr> 去掉sessionState节点</wbr>
1.5.3<wbr><wbr><wbr><wbr><wbr><wbr><wbr> globalization</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
web.config 改为<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="gb2312" culture="zh-cn"/><wbr> 再确认,否则ajax数据提交的时候乱码</wbr>
1.5.4<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 验证</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
在全局级别(Web.config中)设置
<configuration>
<wbr><wbr><wbr> <system.web></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> <pages validateRequest="false"></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
但是,以上设置仅对ASP.NET4.0以上有效。在ASP.NET4.0版本上,我们需要更多一行的配置:
<wbr></wbr>
在全局级别(Web.config中)设置
<configuration>
<wbr><wbr><wbr> <system.web></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> <httpRuntime requestValidationMode="2.0"></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr></wbr>
1.6<wbr><wbr><wbr><wbr> 列表布局</wbr></wbr></wbr></wbr>
列表布局显示不出来了,或者直接考“E:\work\2007-1-30After\Source\软件移植功能文档\1.0转2.0\TableLayout”
<wbr> 这样修改</wbr>
<wbr> LayoutBase.cs 文件 395920986</wbr>
<wbr> EditDataGridLayout</wbr>
<wbr> {</wbr>
<wbr><wbr> ...</wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> HttpContext.Current.Server.UrlEncode(_strCaozuoyuan)</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr> ...</wbr></wbr>
<wbr><wbr>}</wbr></wbr>
<wbr></wbr>
<wbr> TableListControl.aspx文件</wbr>
<wbr><wbr><wbr> 1.public void Page_Load(Object src,EventArgs e)</wbr></wbr></wbr>
<wbr><wbr><wbr> {</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> strcaozuoyuan= HttpContext.Current.Server.UrlDecode(Request["strcaozuoyuan"].ToString());</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> }</wbr></wbr></wbr>
<wbr><wbr><wbr> 2.<form<wbr> action="TableListControlExe.aspx?formname=<% =formname %>&gridname=<% =gridname %</wbr></wbr></wbr></wbr>
>&shuaxin=<% =shuaxin%>&strcaozuoyuan=<%=HttpContext.Current.Server.UrlEncode(strcaozuoyuan)%>&Rows=<% = tmpRowsCount%>"
method="post" name="Form1" target=_self>其中 strcaozuoyuan 要编码
<wbr><wbr> TableListControlExe.aspx</wbr></wbr>
<wbr><wbr> Page_Load</wbr></wbr>
<wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> strcaozuoyuan = HttpContext.Current.Server.UrlDecode(Request["strcaozuoyuan"].ToString());</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr>
<wbr></wbr>
1.7<wbr><wbr><wbr><wbr> 为ajax</wbr></wbr></wbr></wbr>做准备
为ajax 做好准备应将 pubfunc<wbr> 中所有的Response.Write,替换为 ajax输出(excel 导出除外),注意最后要加“;”,不能要script节点,</wbr>
切记,如果本页面使用ajax,那么也要将Response.Write,替换为 ajax 输出;<wbr> 注意,</wbr>
System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "s2", msg, true);其中的S2,是关键字,尽量不要相同,如
果输出了1次,就不会输入出了,造成第2次执行的脚本不输出
<wbr> 否则,不能将原来的response.write都替换为ajax输出,像进货单执行OutPutDecDigitsUsedByJs,再执行选择供应商,供应商选择器出不来</wbr>
<wbr></wbr>
#region 弹出窗口
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //弹出窗口,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxAlert(string msg)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxShowMessage", "alert('" + msg +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"');", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //弹出窗口并跳转页面,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxLocation(string msg, string url)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxLocation", "alert('" + msg +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"');window.location.href= '" + url + "';", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行脚本,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxJs(string msg)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxJs"+(new Random()).Next(100000),</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
msg, true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行confirm点确定跳转到相应页面,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxConfirm(string info, string url)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxConfirm", "if(confirm('" + info +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"')){window.location.href='" + url + "';}", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行confirm,点确定执行脚本,点否执行另外脚本,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxConfirm(string info, string tjs, string fjs)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxConfirm1", "if(confirm('" + info +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"')){" + tjs + "}else{" + fjs + "}", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> #endregion</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.8<wbr><wbr><wbr><wbr> Qwin.js</wbr></wbr></wbr></wbr>
Qwin.js 拖拽的table 增加 style='background-color:#d4d0c8'
1.9<wbr><wbr><wbr><wbr> 验证控件</wbr></wbr></wbr></wbr>
验证控件,在 .net 4.0 的条件下,xp sp2报错 xp sp3 没事。不知道为什么
1.10<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 可以不做,最好做</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.10.1<wbr><wbr> 把常用类加入新的Dll</wbr></wbr>
1)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 把解决方案,bsdqpqx48的上层目录</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
2)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 上层目录加入BLL文件夹,新建工程BLL,把常用类和业务类放入之中,引用相应的类库</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.10.2<wbr><wbr> 日志和调试Log4net</wbr></wbr>
加入log4net 记录日志。
a)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在Lib 加入 log4net.dll</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
b)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在Bsdqpqx工程中加入 Config 文件夹,里面有这个文件“Log4Net.config”</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
c)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在Bsdqpqx工程加入 log 文件夹,,</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
d)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在system里加入“log.aspx”</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
e)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在Global.asax.cs Application_Start 加入PubFunc.ConfigLog()</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
在要使用的类中加入
<wbr><wbr><wbr><wbr><wbr><wbr> public static readonly log4net.ILog loger = LogManager.GetLogger(typeof(PubFunc));</wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr> loger.Error("数据源:" + e.Source + "错误信息:" + e.Message + "错误方法:" + e.TargetSite + "错误数据:" + e.Data);</wbr></wbr></wbr></wbr></wbr>
f)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 在PubFunc.cs 加入</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr> #region log 配置</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static readonly log4net.ILog loger = LogManager.GetLogger(typeof(PubFunc));</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void ConfigLog()</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> string ss = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.IO.FileInfo FiLog4Net = new System.IO.FileInfo(AppDomain.CurrentDomain.SetupInformation.ApplicationBase +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
@"\Config\Log4Net.config");
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> log4net.Config.XmlConfigurator.Configure(FiLog4Net);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> #endregion</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.10.3<wbr><wbr> Ajax</wbr></wbr>选择器,弹出的时候比别的慢
修改选择器Ajax 选择器
<wbr><wbr><wbr> 1.建议先不修改界面ajax,改动的地方比较多</wbr></wbr></wbr>
<wbr><wbr><wbr> 2.具体选择器修改的地方</wbr></wbr></wbr>
1)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 界面上的 DataGrid 要换成 GridView,因为DataGrid 不触发sort事件</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
2)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 界面上的 updatePanel ,同时应用几个 updatepanel ,每个panel只更新自己的,还要配合 hdn 和 按钮。</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> i.<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> C.GridView ViewState 如果改为 false<wbr><wbr> ,除了sort事件,其他事件失效,我现在点击行,调用按钮</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
3)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> pubfunc 中 gridview 的排序,分页,合计</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
4)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> TableLayout 文件夹直接换了吧</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
5)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 增加 gvStyle.css</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
6)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 绑定明细也改为用分页存储过程调用。</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
7)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> GridView.JS,需要引用jquery</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.11<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 关于Vss</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
建立的vss 程序,可以直接拷贝到别人的机子上建立web共享,打开解决方案即可
<wbr><wbr></wbr></wbr>
二、<wbr><wbr> 如果转为网站看看这里</wbr></wbr>
<wbr></wbr>
1.Codebehind 改为 codeFile
2.删除控件声明
3.所有aspx 控件的在aspx 页面加入事件,原来cs 中事件 private 改为 protected<wbr> -------比较麻烦,</wbr>
<wbr> 如果不做这一步,在原有控件上双击按钮会增加新的事件,生成项目的时候,出错;新增加的按钮,双击在aspx 页面加入事件,但是"Web</wbr>
窗体设计器生成的代码"oninit里面没有
3.当AutoEventWireup 为 false (vs2003 是false),page_load 不执行;当为true ,可以删除Web 窗体设计器生成的代码 OnInit
4.未将对象引用到实例,必须删除" Web 窗体设计器生成的代码"
<wbr> 或者,但是,这段会影响以后的新控件,添加事件的开发</wbr>
<wbr><wbr> A. override protected void OnInit(EventArgs e) 函数改为</wbr></wbr>
<wbr><wbr> if (!this.DesignMode)</wbr></wbr>
<wbr><wbr><wbr> {</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> InitializeComponent();</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> base.OnInit(e);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> }</wbr></wbr></wbr>
5.删除resx
6.aspx 中 AutoEventWireup 由 false 改为 "true"
7.好处,发布的时候,加密aspx
8.写的类 app_code
---没有bin
<wbr></wbr>
手动复制到vs2010里
项目:web 应用程序
如果不在 vs2010 转换为web应用程序
1.命名空间要一致,就能打开
2.不用删除控件声明,但是新增加的控件,也没有出现在控件声明中,如果不在 vs2010 转换为web应用程序 we
3.所有aspx 控件的在aspx 页面加入事件,原来cs 中事件 private 改为 protected<wbr> -------比较麻烦,</wbr>
<wbr> 如果不做这一步,在原有控件上双击按钮会增加新的事件,生成项目的时候,出错;新增加的按钮,双击在aspx 页面加入事件,但是"Web</wbr>
3.当AutoEventWireup 为 false (vs2003 是false),page_load 不执行;当为true ,可以删除Web 窗体设计器生成的代码 OnInit
4.未将对象引用到实例,必须删除" Web 窗体设计器生成的代码"
<wbr> 或者,但是,这段会影响以后的新控件,添加事件的开发,可能只有datagrid 是这样</wbr>
<wbr><wbr> A. override protected void OnInit(EventArgs e) 函数改为</wbr></wbr>
<wbr><wbr> if (!this.DesignMode)</wbr></wbr>
<wbr><wbr><wbr> {</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> InitializeComponent();</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> base.OnInit(e);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> }</wbr></wbr></wbr>
<wbr></wbr>
如果在 vs2010 转换为web应用程序
1.命名空间不一致,也能打开页面
<wbr></wbr>
自动转换
1.<wbr><wbr><wbr><wbr><wbr><wbr> 命名空间要一致,就能打开</wbr></wbr></wbr></wbr></wbr></wbr>
====================但是商用,乘用按项目分,又不好建立网站
<wbr></wbr>
<wbr></wbr>
及时编译,
<wbr></wbr>
<wbr></wbr>
1.当按钮在 updatepanel 外部,指定
<wbr><Triggers ></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr> <asp:AsyncPostBackTrigger ControlID ="Button1" /></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></Triggers></wbr>
<wbr>后,也是无刷新。</wbr>
总结:对于updatepanel外部的控件在后台修改后,不会更新回来;
<wbr><wbr><wbr><wbr><wbr> 对于updatepanel内部的控件在后台修改后,会更新回来;</wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
2.用 enableviewstate 设置为false ,可以通过 Request.Form["控件名"]获取
<wbr></wbr>
<wbr></wbr>
4.DataGrid 问题
<wbr><wbr> A. override protected void OnInit(EventArgs e) 函数改为</wbr></wbr>
<wbr><wbr> if (!this.DesignMode)</wbr></wbr>
<wbr><wbr><wbr> {</wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> InitializeComponent();</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> base.OnInit(e);</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr> }</wbr></wbr></wbr>
<wbr><wbr> B.DataGrid 事件的声明 private 改为 protected</wbr></wbr>
======================================================================================================================
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
三、<wbr><wbr> Ajax</wbr></wbr>应用看看这里
<wbr></wbr>
-----------------------ajax 修改相关-------------------------------
<wbr></wbr>
1)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 对于导出excel和打印按钮,要用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr> <Triggers></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> <asp:PostBackTrigger ControlID = "btnCsv"/></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> <asp:PostBackTrigger ControlID = "btnpreview"/></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> </Triggers></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr> 还是保留回发</wbr>
2)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> PubFunc.ReturnArrTextBoxName(Page) 如果放置了UpdatePanel1,应该为PubFunc.ReturnArrTextBoxName(UpdatePanel1)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
3)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 应将 pubfunc<wbr> 中所有的Response.Write,替换为 ajax输出,不能要script节点,切记,如果本页面使用ajax,那么也要将Response.Write,替换为 ajax 输出;<wbr> 注意, System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "s2", msg, true);其中的S2,是关键字,尽量不要相同,如果输出了1次,就不会输入出了,造成第2次执行的脚本不输出 否则,不能将原来的response.write都替换为ajax输出,像进货单执行OutPutDecDigitsUsedByJs,再执行选择供应商,供应商选择器出不来</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
4)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> Ajax 脚本输出函数</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
#region 弹出窗口
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //弹出窗口,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxAlert(string msg)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxShowMessage", "alert('" + msg +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"');", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //弹出窗口并跳转页面,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxLocation(string msg, string url)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxLocation", "alert('" + msg +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"');window.location.href= '" + url + "';", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行脚本,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxJs(string msg)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxJs"+(new Random()).Next(100000),</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
msg, true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行confirm点确定跳转到相应页面,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxConfirm(string info, string url)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxConfirm", "if(confirm('" + info +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"')){window.location.href='" + url + "';}", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //执行confirm,点确定执行脚本,点否执行另外脚本,ajax可用</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static void AjaxConfirm(string info, string tjs, string fjs)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.Page page = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> System.Web.UI.ScriptManager.RegisterStartupScript(page, page.GetType(), "ajaxConfirm1", "if(confirm('" + info +</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
"')){" + tjs + "}else{" + fjs + "}", true);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> #endregion</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr></wbr>
5)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 发送短信的界面好像有问题(选择多个客户)</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
6)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 4.为了保证布局 ,滚动条不动,应用ajax的时候,应该执行以下查询,updatepanel应放到 <div<wbr> autodiv >里面 而且必须放置静态 <div<wbr> autodiv ></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
7)<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 现在用了 htc 文件,导致使用ajax后,还是有进度条显示;脚本没有问题</wbr></wbr></wbr></wbr></wbr></wbr></wbr>
8)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>把这个加在,scriptmanager 后<script type="text/javascript"></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {//任何updatepanel 更新的时候都会执行</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> doContentreadyForTable();//函数体,可以放到日历控件中</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>}</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr><wbr><wbr> );</wbr></wbr></wbr>
<wbr><wbr><wbr> </script></wbr></wbr></wbr>
9)<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>考虑改为脚本处理颜色样式</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
10)<wbr><wbr><wbr><wbr><wbr><wbr>配件选择器,加了ajax后,关闭的时候特别慢,不知道为什么。showmodal 阻止页面回发</wbr></wbr></wbr></wbr></wbr></wbr>
11)<wbr><wbr><wbr><wbr><wbr><wbr>div有滚动条第1次,滚动条回到最上面。因为,div 回发了。</wbr></wbr></wbr></wbr></wbr></wbr>
12)<wbr><wbr><wbr><wbr><wbr><wbr>htc对于页面呈现比较慢</wbr></wbr></wbr></wbr></wbr></wbr>
13)<wbr><wbr><wbr><wbr><wbr><wbr>页面之中有图片的话,也会有进度条的</wbr></wbr></wbr></wbr></wbr></wbr>
14)<wbr><wbr><wbr><wbr><wbr><wbr>----总结页面之中最好不要有htc,图片少些,用脚本替代</wbr></wbr></wbr></wbr></wbr></wbr>
15)<wbr><wbr><wbr><wbr> linkbutton .ajax2.0 bug ,按钮:如linkbutton 通过脚本调用另1个按钮点击,不能执行第2个按钮的后台事件,前台的可以执行。但是pageload里,可以执行调用按钮的点击事件</wbr></wbr></wbr></wbr>
<wbr></wbr>
16)<wbr><wbr><wbr><wbr> 8.对于选择器按钮,应设置 前台事件,不执行后天事件</wbr></wbr></wbr></wbr>
<wbr><wbr> A.需要控制按钮的可用</wbr></wbr>
<wbr><wbr> B.showmodal 会卡,无刷新放置了后会卡;最好是前台输出,否则关闭时数据量大的时候卡。showmodal 阻止页面回发</wbr></wbr>
<wbr><wbr> C.传值</wbr></wbr>
<wbr><wbr> E.怎么保存页面</wbr></wbr>
<wbr><wbr> D.第1个按钮,调用另1个按钮的情况很多。</wbr></wbr>
17)<wbr><wbr><wbr><wbr> session 丢失后,会出现脚本错误,ajaxtimer不写事件即可</wbr></wbr></wbr></wbr>
18)<wbr><wbr><wbr><wbr> 对于无刷新,脚本的输出不会反应出来</wbr></wbr></wbr></wbr>
19)<wbr><wbr><wbr><wbr> 验证控件,__postback的脚本会发生变化。</wbr></wbr></wbr></wbr>
20)<wbr><wbr><wbr><wbr> 放多个updatepanel 比放1个要快,当单据数据多的时候,合理放置updatepanel ,比如:保存按钮放updatepanel1,datagrid放</wbr></wbr></wbr></wbr>
20)
21)<wbr><wbr><wbr><wbr> updatepanel2,保存中的验证不需要刷新datagrid</wbr></wbr></wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
<wbr></wbr>
=====================web.config 2.0==============================
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<wbr> <!--微软树控件--><br><wbr> <configSections><br><wbr><wbr><wbr> <section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><br><wbr> </configSections><br><wbr> <MicrosoftWebControls><br><wbr><wbr><wbr> <add key="CommonFiles" value="../Images/Tree"><br><wbr><wbr><wbr> </add><br><wbr> </MicrosoftWebControls><br><wbr> <!--微软树控件--><br><wbr> <system.web><br><wbr><wbr><wbr> <compilation defaultLanguage="c#" debug="true" ><br><wbr><wbr><wbr><wbr><wbr> <assemblies><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br><wbr><wbr><wbr><wbr><wbr> </assemblies><br><wbr><wbr><wbr> </compilation><br><wbr><wbr><wbr> <customErrors mode="RemoteOnly" /><br><wbr><wbr><wbr> <identity impersonate="false" /><br><wbr><wbr><wbr> <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="gb2312" culture="zh-cn"/></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr> <httpRuntime requestValidationMode="2.0"/><br><wbr><wbr><wbr> <pages validateRequest="false" enableEventValidation="false" ><br><wbr><wbr><wbr><wbr><wbr> <controls><br><wbr><wbr><wbr><wbr><wbr><wbr><wbr> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br><wbr><wbr><wbr><wbr><wbr> </controls><br><wbr><wbr><wbr> </pages><br><wbr><wbr><wbr> <httpHandlers><br><wbr><wbr><wbr><wbr><wbr> <remove verb="*" path="*.asmx"/><br><wbr><wbr><wbr><wbr><wbr> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br><wbr><wbr><wbr><wbr><wbr> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br><wbr><wbr><wbr><wbr><wbr> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><br><wbr><wbr><wbr> </httpHandlers><br><wbr><wbr><wbr> <httpModules><br><wbr><wbr><wbr><wbr><wbr> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br><wbr><wbr><wbr> </httpModules><br><wbr> </system.web><br><wbr> <appSettings><br><wbr><wbr><wbr> <add key="aspnet:MaxHttpCollectionKeys" value="5000" /><br><wbr><wbr><wbr> <add key="connString" value="packet size=4096;Max Pool Size=512;user id=sa;data source=localhost;persist security info=True;initial catalog=master;password=pwd" /><br><wbr><wbr><wbr> <add key="serverName" value="(local)" /><br><wbr><wbr><wbr> <add key="userName" value="sa" /><br><wbr><wbr><wbr> <add key="serverPassword" value="" /><br><wbr><wbr><wbr> <add key="dbName" value="bs2s48" /><br><wbr><wbr><wbr> <add key="admin" value="admin" /><br><wbr><wbr><wbr> <add key="adminPwd" value="1234" /><br><wbr><wbr><wbr> <add key="MaxOnLineCount" value="5" /><br><wbr><wbr><wbr> <add key="DaoqiRiqi" value="2011-12-26" /><br><wbr><wbr><wbr> <add key="GongNeng" value="ABC" /><br><wbr><wbr><wbr> <add key="DianShu" value="5" /><br><wbr> </appSettings><br> </configuration></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
===================================web.config 4.0==================================
<?xml version="1.0"?>
<configuration>
<wbr><!--微软树控件--><br><wbr><configSections><br><wbr><wbr><section name="MicrosoftWebControls"</wbr></wbr></wbr></wbr>
type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<wbr></configSections><br><wbr><MicrosoftWebControls><br><wbr><wbr><add key="CommonFiles" value="../Images/Tree"><br><wbr><wbr></add><br><wbr></MicrosoftWebControls><br><wbr><!--微软树控件--><br><wbr><system.web><br><wbr><wbr><compilation defaultLanguage="c#" debug="true" targetFramework="4.0"><br><wbr><wbr><wbr><assemblies><add assembly="System.Web.Extensions, Version=4.0.0.0,</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></assemblies></compilation>
<wbr><wbr><wbr><wbr><br><wbr><wbr><customErrors mode="RemoteOnly"/><br><wbr><wbr><identity impersonate="false"/><br><wbr><wbr><globalization requestEncoding="utf-8" responseEncoding="utf-8"</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
fileEncoding="gb2312" culture="zh-cn"/>
<wbr><wbr><pages validateRequest="false" enableEventValidation="false"</wbr></wbr>
controlRenderingCompatib<wbr>ilityVersion="3.5" clientIDMode="AutoID"><br><wbr><wbr></pages><br><wbr></system.web><br><wbr><appSettings><br><wbr><wbr><add key="aspnet:MaxHttpCollectionKeys" value="5000"/><br><wbr><wbr><add key="connString" value="packet size=4096;Max Pool Size=512;user</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
id=sa;data source=localhost;persist security info=True;initial catalog=master;password=pwd"/>
<wbr><wbr><add key="serverName" value="(local)"/><br><wbr><wbr><add key="userName" value="sa"/><br><wbr><wbr><add key="serverPassword" value=""/><br><wbr><wbr><add key="dbName" value="bs2s48"/><br><wbr><wbr><add key="admin" value="admin"/><br><wbr><wbr><add key="adminPwd" value="1234"/><br><wbr><wbr><add key="MaxOnLineCount" value="5"/><br><wbr><wbr><add key="DaoqiRiqi" value="2011-12-26"/><br><wbr><wbr><add key="GongNeng" value="ABC"/><br><wbr><wbr><add key="DianShu" value="5"/></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>