admin管理员组文章数量:1307658
I downloaded and setup MS's Stock Trader app. I'm running Vista Ultimate, IIS7, VS 2008 / .NET 3.5. The entire app is about 120 MB so is quite involved but it all seemed to setup fine from the msi. When I run the app and try to login I get a javascript error after clicking the Login link:
WebForm_DoPostBackWithOptions is not defined
When I view the page source the Login link renders the following:
<a id="LinkLogin" class="Button" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("LinkLogin", "", false, "", "Login.aspx", false, true))">Login</a>
I've googled this and found a solution that people have used in IIS 6:
Bring up IIS and right-click on your virtual directory. Select "Properties". On the Virtual Directory tab in the Application Settings section, click the "Configuration" button. This brings up the "Mappings" tab. Highlight the entry for ".axd" and click "Edit". Be sure that the lower left-hand checkbox for "Check that File Exists" is unchecked! If not, uncheck it and click "OK". The WebResource.axd references you see when doing "View Source" on a .NET webpage don't actually link to a physical file, so if this box is checked then the scripts don't get loaded correctly.
However I can't see how to do the above in IIS 7. There is a "Handler Mappings" section with 2 entries for "WebResource.axd" but not with the settings mentioned above. Does anyone have a solution to the problem, or know how to implement the IIS 6 fix above in IIS 7?
I downloaded and setup MS's Stock Trader app. I'm running Vista Ultimate, IIS7, VS 2008 / .NET 3.5. The entire app is about 120 MB so is quite involved but it all seemed to setup fine from the msi. When I run the app and try to login I get a javascript error after clicking the Login link:
WebForm_DoPostBackWithOptions is not defined
When I view the page source the Login link renders the following:
<a id="LinkLogin" class="Button" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("LinkLogin", "", false, "", "Login.aspx", false, true))">Login</a>
I've googled this and found a solution that people have used in IIS 6:
Bring up IIS and right-click on your virtual directory. Select "Properties". On the Virtual Directory tab in the Application Settings section, click the "Configuration" button. This brings up the "Mappings" tab. Highlight the entry for ".axd" and click "Edit". Be sure that the lower left-hand checkbox for "Check that File Exists" is unchecked! If not, uncheck it and click "OK". The WebResource.axd references you see when doing "View Source" on a .NET webpage don't actually link to a physical file, so if this box is checked then the scripts don't get loaded correctly.
However I can't see how to do the above in IIS 7. There is a "Handler Mappings" section with 2 entries for "WebResource.axd" but not with the settings mentioned above. Does anyone have a solution to the problem, or know how to implement the IIS 6 fix above in IIS 7?
Share Improve this question asked Oct 14, 2010 at 13:30 Ciarán BruenCiarán Bruen 5,34113 gold badges61 silver badges69 bronze badges2 Answers
Reset to default 3One solution is to set the LinkButton CausesValidation=false
I know that this is a bit late, but hopefully this can help future searchers.
Under Handler Mappings, right click and click Edit. Then click Request Restrictions, there is a mapping tab - selecting "Invoke handler only if request is mapped to" and "File" is equivalent to "check if file exists".
本文标签: javascriptWebFormDoPostBackWithOptions is not definedStack Overflow
版权声明:本文标题:javascript - WebForm_DoPostBackWithOptions is not defined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741846263a2400797.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论