I would really like to disable the rendering for the form tag. Basically asp.net will be providing read only pages which sho开发者_Go百科uld be very clean. i.e, no form tags required
Take it out of the markup then. I don't think it's required if you're only providing read-only access. I'm able to create straight .aspx files on the web server without the form tag, and they work fine. Don't expect your postbacks to work, though.
Have you looked into ASP.NET MVC? It is designed for just this kind of thing...
ASP.NET WebForms does not work well without the main form (ViewState, PostBack, etc. will fail horribly). I think you may be using the wrong tool for your problem.
We have some read-only pages in a system, and we simply fetch the data from our DB as XML and apply an XSLT stylesheet to this. Might be overkill for you however.
Alternatively, why not just remove the tag? Or use an HTML page?
精彩评论