By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

Postback problem - different .net-versions?

P: n/a
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("m icrosoft")
-1) {

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("n etscape") >
-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/K....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!
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
..Net-framework service pack 1 did the trick.
Case solved, never mind this posting.

Frankieboy
fr***@langva.com (Frankieboy) wrote in message news:<5c**************************@posting.google. com>...
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("m icrosoft")
-1) {

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("n etscape") >
-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/K....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!

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.