Example #1
0
 protected override void Render(HtmlTextWriter writer)
 {
     if (HiContext.Current.IsUrlReWritten)
     {
         if (writer is Html32TextWriter)
         {
             writer = new FormFixerHtml32TextWriter(writer.InnerWriter);
         }
         else
         {
             writer = new FormFixerHtmlTextWriter(writer.InnerWriter);
         }
     }
     if (EnableViewState)
     {
         base.Render(writer);
     }
     else
     {
         using (StringWriter writer2 = new StringWriter())
         {
             using (HtmlTextWriter writer3 = new HtmlTextWriter(writer2))
             {
                 base.Render(writer3);
                 string input = writer2.ToString();
                 Match  match = viewStateRegex.Match(input);
                 if (match.Success)
                 {
                     input = input.Remove(match.Index, match.Length);
                 }
                 writer.Write(input);
             }
         }
     }
 }
Example #2
0
 protected override void Render(HtmlTextWriter writer)
 {
     if (HiContext.Current.IsUrlReWritten)
     {
         if (writer is Html32TextWriter)
         {
             writer = new FormFixerHtml32TextWriter(writer.InnerWriter);
         }
         else
         {
             writer = new FormFixerHtmlTextWriter(writer.InnerWriter);
         }
     }
     if (this.EnableViewState)
     {
         base.Render(writer);
         return;
     }
     using (StringWriter stringWriter = new StringWriter())
     {
         using (HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter))
         {
             base.Render(htmlTextWriter);
             string text  = stringWriter.ToString();
             Match  match = HiPage.viewStateRegex.Match(text);
             if (match.Success)
             {
                 text = text.Remove(match.Index, match.Length);
             }
             writer.Write(text);
         }
     }
 }
Example #3
0
 protected override void Render(HtmlTextWriter writer)
 {
     if (HiContext.Current.IsUrlReWritten)
     {
         if (writer is Html32TextWriter)
         {
             writer = new FormFixerHtml32TextWriter(writer.InnerWriter);
         }
         else
         {
             writer = new FormFixerHtmlTextWriter(writer.InnerWriter);
         }
     }
     if (EnableViewState)
     {
         base.Render(writer);
     }
     else
     {
         using (StringWriter writer2 = new StringWriter())
         {
             using (HtmlTextWriter writer3 = new HtmlTextWriter(writer2))
             {
                 base.Render(writer3);
                 string input = writer2.ToString();
                 Match match = viewStateRegex.Match(input);
                 if (match.Success)
                 {
                     input = input.Remove(match.Index, match.Length);
                 }
                 writer.Write(input);
             }
         }
     }
 }