开发者

I don't want to render the form tag

开发者 https://www.devze.com 2023-01-10 20:59 出处:网络
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 requiredTake it out of the

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消