Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > C#/.NET入门教程

aspx不显示ViewState的实例

来源:中文源码网    浏览:173 次    日期:2024-05-14 13:28:27
【下载文档:  aspx不显示ViewState的实例.txt 】


aspx不显示ViewState的实例
复制代码 代码如下:System.IO.StringWriter html = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter tw = new System.Web.UI.HtmlTextWriter(html); base.Render(tw); string Temp = html.ToString(); string s1 = string.Empty, s2 = string.Empty, s3 = string.Empty, s4 = string.Empty, s5 = string.Empty, s6 = string.Empty; int i = 0; int j = 0; i = Temp.IndexOf(" 0) { j = Temp.IndexOf(">", i); s1 = Temp.Substring(0, i); s2 = Temp.Substring(j + 1, Temp.Length - j - 1); } i = s2.IndexOf(" 0) { j = s2.IndexOf(">", i); s3 = s2.Substring(0, i); s4 = s2.Substring(j + 1, s2.Length - j - 1); } i = s4.IndexOf(" 0) { j = s4.IndexOf(">", i); s5 = s4.Substring(0, i); s6 = s4.Substring(j + 1, s4.Length - j - 1); Temp = s1 + s3 + s5 + s6; } else { Temp = s1 + s3 + s4; } Temp = Temp.Replace("", ""); Temp = Temp.Replace("\r\n", ""); tw.Close(); Response.Write(Temp);

相关内容