Hi all,

I've been trying to write a web page in asp.net which uses a javascript xmlhttprequest object to return the contents of another asp.net page when the user clicks a button.

Having spent ages debugging the "unknown runtime error" that the browser throws, I've narrowed it down to the fact that the aspx page being accessed by the xmlhttprequest contains the standard asp.net <form id="form1" runat="server"> markup. If I change this to a <div> tag, the browser returns no error.

Does this mean that the xmlhttprequest object will not ever work with asp.net pages with a code behind file? I would have expected the xmlhttprequest to return the finished html generated by the aspx/VB server side code, as happens when you point xmlhttprequest at a PHP page, so not be affected by any pre-processing markup.

Can anyone explain, or tell me if there's a workaround?

Thank you.