I've created an extension method to allow panels in my web application to rendertoHTML on demand.
Unfortunately to do it as I am, requires that EventValidation is turned off. I don't want to turn it off for the entire site, and I do not want to have to know before hand to turn it off in the page direction.
Surely there is a way to turn it off as needed, then turn it back on after I'm done? It seems more secure that way.
Public Function RenderedOutput(ByVal c As System.Web.UI.WebControls.Panel) As String
Dim SB As New System.Text.StringBuilder()
Using swr As New System.IO.StringWriter(SB)
Using htmltw As New System.Web.UI.HtmlTextWriter(swr)