Skip to main content

Posts

Showing posts from January, 2009

Hacking ASP.NET - Rendering Controls Alone

Sometimes we want to render just a control into the client browser using native ajax (I mean, without atlas or ajax extensions), but it's not as easy as you could think... For example, if you have to render a GridView alone, without another html information you will probably see some unknown exceptions... - 1st try The first thing I made was create an empty aspx page (with no html tags) and add a GridView, but oops!, when I runned it, asp.net throws a exception saying that all the controls need to be inside a html <form>... It has sense, so close IE and try again... - 2nd try Ok... Now I already added the <form> tag into the aspx page, opened it into the browser and everything works great. But wait!, I still haven't the ajax part written.... it's not hard to do, I just have to create a XMLHttpRequest in javascript and write the response into a <div>.. When I run the page containing the ajax script, IE throws a 'Unknown Error' exactly where i wr