Wednesday, December 28, 2011

Server-side code not called after client-side javascript on Windows 7 machine

Hi - I have an ASP.Net 4.0 solution that runs fine

on a Windows 2008 server. However, I've just been given a new Windows 7 64-bit
machine to use as my development machine and I'm having a problem with one of my
aspx pages. This page has some javascript on it, which runs fine, but then it
gets to the following code:
<script type="text/javascript">
//<![CDATA[var theForm = document.forms['aspnetForm'];
if (!theForm) {   
 theForm = document.aspnetForm;}
function __doPostBack(eventTarget, eventArgument) {   
 if (!theForm.onsubmit || (theForm.onsubmit() != false)) {        
theForm.__EVENTTARGET.value = eventTarget;        
theForm.__EVENTARGUMENT.value = eventArgument;       
 theForm.submit();    
}}//]]></script>
This not code that I've written; it's code that's
generated client-side that I see as I'm debugging my app in Visual Studio 2010
(trying to figure out what the $^#$ is going on). At any rate, once this code
completes, the app does?a post back, but then??does nothing. The debugger should take me to some server-side
code called by the button click that calls the client-side javascript, but it doesn't. It just sits there. The result is that the page doesn't do
what it's supposed to do (no inserts to databases, no success messages, no
nothing).

As I said, this problem is restricted to my W7 64-bit machine;
it runs fine on W2008. Other pages with javascript in the same solution work
fine on my W7 machine. I found a post (http://dopostback.net/index.php/net-...anel-problems/) that
discusses a similar issue within an UpdatePanel, but I'm not using UpdatePanel.
My page does have hidden controls on it, but so do other pages that work just
fine. Does anyone know what could be causing this?

Thanks!

Source: http://forums.asp.net/p/1751556/4741314.aspx/1?Server+side+code+not+called+after+client+side+javascript+on+Windows+7+machine

matt jones snow white and the huntsman trailer snow white and the huntsman trailer sexiest man alive kentucky basketball heather locklear bob costas

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.