473,416 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Postback problem - different .net-versions?

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
1 1691
..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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: V | last post by:
I have found that when I have a composite control that uses the CreateChildControls method, on a regular page load, Page_Load executes before CreateChildControls, but on a postback it is the...
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
5
by: Darrel | last post by:
I'm dimming a string at the top of my page so I can use it in several different subs on the page. I'm setting the text in one sub and then reading it in several. I'd like to also use this...
8
by: walesboy | last post by:
greetings - I have a btnSubmit button with a Handles btnSubmit.click which works great if all the user does is click that button. But, if the user ALSO changes a text box on the page (which...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
2
by: news.microsoft.com | last post by:
How can I tell which control caused a postback? I have several controls that cause a postback, and I want to take different actions depending on which was activated. It seems a little backward...
6
by: Shawn | last post by:
Any ideas how I can have a button click on one open page force a postback on a different page.
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.