最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ASP.NET webforms without javascript - Stack Overflow

programmeradmin4浏览0评论

Due to a security requirement all browsers that will run a web application we need to create must have all client side scripting disabled. So that means no Javascript. Unfortunately Web Forms make quite some use of Javascript. The login control works without Javascript, but a button does not (it calls the Javascript function __doPostback()). So to make it work we'd need to program all the forms by hand (the ASP Classic, or PHP method). But I was wondering if there is a framework available for ASP.NET that offers the normal ASP.NET controls (treeview, gridview, etc) with all the functoinality they have, but that doesn't use Javascript and doesn't require the programmer to program massive amounts of logic?

Update: For clarification, I know ASP.NET MVC is an option that will help a bit, but it won't give me a nice GridView. So I'm wondering if there is a 100% functional, 100% no-javascript replacement for the standard ASP.NET controls.

Thanks.

Update2: It's been a while and I never found the exact answer I was looking for. Probably because what I want doesn't exist. So I'll go for ASP.NET MVC which is the next best thing.

Due to a security requirement all browsers that will run a web application we need to create must have all client side scripting disabled. So that means no Javascript. Unfortunately Web Forms make quite some use of Javascript. The login control works without Javascript, but a button does not (it calls the Javascript function __doPostback()). So to make it work we'd need to program all the forms by hand (the ASP Classic, or PHP method). But I was wondering if there is a framework available for ASP.NET that offers the normal ASP.NET controls (treeview, gridview, etc) with all the functoinality they have, but that doesn't use Javascript and doesn't require the programmer to program massive amounts of logic?

Update: For clarification, I know ASP.NET MVC is an option that will help a bit, but it won't give me a nice GridView. So I'm wondering if there is a 100% functional, 100% no-javascript replacement for the standard ASP.NET controls.

Thanks.

Update2: It's been a while and I never found the exact answer I was looking for. Probably because what I want doesn't exist. So I'll go for ASP.NET MVC which is the next best thing.

Share Improve this question edited Dec 5, 2009 at 15:11 Jeroen-bart Engelen asked Apr 16, 2009 at 12:53 Jeroen-bart EngelenJeroen-bart Engelen 1,1672 gold badges12 silver badges19 bronze badges 2
  • That is some very tight security. Why not simply add the url for the web application as a trusted site, or a custom security site that allows javascript? Javascript in itself is so limited it doesn't pose much of a threat, particularly when all you're using is your own code (with no x-site scripts) – SirDemon Commented Apr 16, 2009 at 13:02
  • Sorry you didn't get the answer you were looking for. This was a good question though. – Crescent Fresh Commented Dec 5, 2009 at 15:33
Add a ment  | 

2 Answers 2

Reset to default 6

ASP.Net MVC is probally the closest you'd get. You can use it to build a site without javascript. It is very different from Web forms

Many of the stock controls will be problematic. They just depend too heavily on Javascript. You do have some options, though:

  • ASP.Net MVC should give you a bit more control over your html
  • You can build your own replacement WebForms control library that doesn't rely on javascript to provide alternatives for controls that do.
发布评论

评论列表(0)

  1. 暂无评论