суббота, 3 января 2009 г.

Embedding Forms in an ASP.NET Web Page - ASP.NET

A solution to embed any number of forms going to any URL on the web within any ASP.NET page.


A solution that effectively replaces the __doPostBack function, but the converter tool takes an even simpler approach. It hijacks the form post with script coded directly into an anchor tag:

<a href="javascript:theForm.__VIEWSTATE.value='';
theForm.encoding='application/x-www-form-urlencoded';
theForm.action='http://www.myanothersite.com/form2.aspx';
theForm.submit();" name="submit"
>My form submit</a>


References:
http://www.nerdymusings.com/LPMArticle.asp?ID=27