Postback problem - different .net-versions?

F

Frankieboy

I believe I've got a postback problem on our site. The strange thing
is that everything works fine on my developing version, but not on the
production site. I'm wondering if there may be different
..net-frameworks running.

What I can read from the _doPostBack the developer edition is testing
for Microsoft in the _doPostBack-routine, while the production site
version is testing for Netscape in the _doPostBack-routine.

Some code exerpts to illustrate the problem:

When I run the site on the developer edition this generates the
following form-tag and __doPostBack-event:

<form name="__aspnetForm" method="post" action="[WHATEVER]"
id="__aspnetForm" enctype="multipart/form-data">

<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
theform = document.__aspnetForm;
}
else {
theform = document.forms["__aspnetForm"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>


However, on the production site the form and __doPostBack is slightly
different:
- another form name
- _doPostBack is slightly different, now checking for Netscape in
stead of MS

<form name="defaultframeworkefaultForm" method="post"
action="[WHATEVER]" id="defaultframework_DefaultForm"
enctype="multipart/form-data">

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") >
-1) {
theform = document.forms["defaultframeworkefaultForm"];
}
else {
theform = document.defaultframeworkefaultForm;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>


Whenever I save the page to an static HTML-page, and replaces the
form-tag and the __doPostBack from my local edition to the production
site, things seems OK. So my question is:
Where are these defined? How can I alter the code which is generated
on the production site to match the code generated on the developer
site.

Check it out at http://www.ks-bedrift.no/templates/KS/KS_XMLMemberList.aspx?id=21419.
The dropdown and search fields in main area of page won't run because
of this error.

When checking folders on server I find that there is a folder
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322. I interpret this as the
server is running version 1.1.4322 of .net, which actually is the same
that seems to be running on the developer-machine. At least both
machines have this folder. Is there another way of checking the exact
..net-version running?

The developer machine is running Windows XP and Visual Studio.Net. The
live-server is running Windows Server 2003 Standard Edition.

Any good advice would be highly appreciated!
 
F

Frankieboy

..Net-framework service pack 1 did the trick.
Case solved, never mind this posting.

Frankieboy


I believe I've got a postback problem on our site. The strange thing
is that everything works fine on my developing version, but not on the
production site. I'm wondering if there may be different
.net-frameworks running.

What I can read from the _doPostBack the developer edition is testing
for Microsoft in the _doPostBack-routine, while the production site
version is testing for Netscape in the _doPostBack-routine.

Some code exerpts to illustrate the problem:

When I run the site on the developer edition this generates the
following form-tag and __doPostBack-event:

<form name="__aspnetForm" method="post" action="[WHATEVER]"
id="__aspnetForm" enctype="multipart/form-data">

<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
theform = document.__aspnetForm;
}
else {
theform = document.forms["__aspnetForm"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>


However, on the production site the form and __doPostBack is slightly
different:
- another form name
- _doPostBack is slightly different, now checking for Netscape in
stead of MS

<form name="defaultframeworkefaultForm" method="post"
action="[WHATEVER]" id="defaultframework_DefaultForm"
enctype="multipart/form-data">

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") >
-1) {
theform = document.forms["defaultframeworkefaultForm"];
}
else {
theform = document.defaultframeworkefaultForm;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>


Whenever I save the page to an static HTML-page, and replaces the
form-tag and the __doPostBack from my local edition to the production
site, things seems OK. So my question is:
Where are these defined? How can I alter the code which is generated
on the production site to match the code generated on the developer
site.

Check it out at http://www.ks-bedrift.no/templates/KS/KS_XMLMemberList.aspx?id=21419.
The dropdown and search fields in main area of page won't run because
of this error.

When checking folders on server I find that there is a folder
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322. I interpret this as the
server is running version 1.1.4322 of .net, which actually is the same
that seems to be running on the developer-machine. At least both
machines have this folder. Is there another way of checking the exact
.net-version running?

The developer machine is running Windows XP and Visual Studio.Net. The
live-server is running Windows Server 2003 Standard Edition.

Any good advice would be highly appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top