protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
if(writer is System.Web.UI.Html32TextWriter)
{ writer=new FormFixerHtml32TextWriter(writer.InnerWriter);}
else
{ writer=new FormFixerHtmlTextWriter(writer.InnerWriter);}
base.Render(writer);
}
{
if(writer is System.Web.UI.Html32TextWriter)
{ writer=new FormFixerHtml32TextWriter(writer.InnerWriter);}
else
{ writer=new FormFixerHtmlTextWriter(writer.InnerWriter);}
base.Render(writer);
}
internal class FormFixerHtml32TextWriter:System.Web.UI.Html32TextWriter
{
private string _url;
internal FormFixerHtml32TextWriter(TextWriter writer):base(writer)
{
_url=HttpContext.Current.Request.RawUrl;
}
public override void WriteAttribute(string name, string value, bool fEncode)
{
if(_url!=null&&string.Compare(name,"action",true)==0)
{
value=_url;
}
base.WriteAttribute (name, value, fEncode);
}
}
internal class FormFixerHtmlTextWriter:System.Web.UI.HtmlTextWriter
{
private string _url;
internal FormFixerHtmlTextWriter(TextWriter writer):base(writer)
{
_url=HttpContext.Current.Request.RawUrl;
}
public override void WriteAttribute(string name, string value, bool fEncode)
{
if(_url!=null&& string.Compare(name,"action",true)==0)
{
value=_url;
}
base.WriteAttribute (name, value, fEncode);
}
}
{
private string _url;
internal FormFixerHtml32TextWriter(TextWriter writer):base(writer)
{
_url=HttpContext.Current.Request.RawUrl;
}
public override void WriteAttribute(string name, string value, bool fEncode)
{
if(_url!=null&&string.Compare(name,"action",true)==0)
{
value=_url;
}
base.WriteAttribute (name, value, fEncode);
}
}
internal class FormFixerHtmlTextWriter:System.Web.UI.HtmlTextWriter
{
private string _url;
internal FormFixerHtmlTextWriter(TextWriter writer):base(writer)
{
_url=HttpContext.Current.Request.RawUrl;
}
public override void WriteAttribute(string name, string value, bool fEncode)
{
if(_url!=null&& string.Compare(name,"action",true)==0)
{
value=_url;
}
base.WriteAttribute (name, value, fEncode);
}
}