PostBack Events on Server Running .NET 1.1 and 2.0

B

Ben Dewey

This is a repost, But I have some new information.

I have a server that is configured for .NET 1.1 and 2.0. For some reason
all my postback events for aren't firing when using .NET 1.1. Under IIS in
ASP.NET tab, if i switch to 2.0 then the events fire correctly, but my code
is not set up for that so i get some random errors. And when i switch back
to 1.1 my events still don't fire

Anyone know why my post backs are not firing in 1.1?

NEW INFO:
It is only submit buttons that are failing on pages with a validator. Here
is a sample of the source code from the Reset Password Page that has a
comparevalidator

SOURCE OUTPUT:

<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<title>title</title>
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<link href="../screen.css" type="text/css" rel="stylesheet"
media="screen">
<link href="../print.css" type="text/css" rel="stylesheet" media="print">
<script language="javascript" defer>
function togglePasswords(show)
{
displayText = show ? "" : "none";

if (document.getElementById('passwordRow1')!=undefined)
{
document.getElementById('passwordRow1').style.display = displayText;
document.getElementById('passwordRow2').style.display = displayText;
document.getElementById('passwordRow3').style.display = displayText;
document.getElementById('passwordRow4').style.display = displayText;
}
}
</script>
</head>
<body bottommargin="0" leftmargin="0" background="../images/scanline.gif"
topmargin="0"
rightmargin="0">

<table border="0" cellpadding="0" cellspacing="0" width="100%"
height="100%">
<tr>
<td width="25" rowspan="4"><img src="../images/spacer.gif" width="25"
height="1"></td>
<td background="../images/right-side.gif" width="7" rowspan="4"><img
src="../images/spacer.gif" width="7"></td>
<td width="100%" height="115" bgcolor="#ffffff">
<table width="100%" height="115">
<tr>
<td rowspan="2">
<object id="logo2"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
height="115" width="200" align="middle"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
viewastext>
<param name="_cx" value="5292">
<param name="_cy" value="3043">
<param name="FlashVars" value="">
<param name="Movie" value="../flash/logo2.swf">
<param name="Src" value="../flash/logo2.swf">
<param name="WMode" value="Window">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value="">
<param name="Menu" value="-1">
<param name="Base" value="">
<param name="AllowScriptAccess" value="sameDomain">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value="FFFFFF">
<param name="SWRemote" value="">
<param name="MovieData" value="">
<param name="SeamlessTabbing" value="1">
<embed src="../flash/logo2.swf" quality="high" bgcolor="#ffffff"
width="200" height="115"
name="logo2" align="middle" allowscriptaccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td align="right" valign="top"><a href="http://www.site.com/"
target="websites"><img src="../images/logo.gif" border="0" width="89"
height="40"></a></td>
</tr>
<tr>
<td align="right"><!-- Change Product Place Holder -->
<a href="default.aspx">Home</a>&nbsp;
<a href="login.aspx?logout">Logout</a></td>
</tr>
</table>
</td>
<td background="../images/left-side.gif" width="7" rowspan="4"><img
src="../images/spacer.gif" width="7"></td>
<td width="25" rowspan="4"><img src="../images/spacer.gif" width="25"
height="1" rowspan="3"></td>
</tr>
<tr>
<td width="100%" height="37" background="../images/div-bar.gif"><img
src="../images/spacer.gif" height="37" width="1"></td>
</tr>
<tr>
<td width="100%" height="100%" bgcolor="#ffffff" align="center"
valign="top">


<br>
<form name="_ctl0" method="post" action="users.aspx" language="javascript"
onsubmit="if (!ValidatorOnSubmit()) return false;" id="_ctl0">
<input type="hidden" name="__VIEWSTATE"
value=""
/>

<script language="javascript" type="text/javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>


<div id="passwordPanel" designtimedragdrop="576">

<table cellspacing="0" cellpadding="4" width="80%" border="0">
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
<tr>
<td class="bgHeader" align="center" colspan="2">Reset Password</td>
</tr>
<tr>
<td bgcolor="#000000" colspan="5" height="1"></td>
<tr class="rowColor1">
<td align="right">Password:</td>
<td>
<input name="ResetPassword" type="password" id="ResetPassword"
style="width:250px;" /></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor0">
<td align="right">Confirm Password:</td>
<td>
<input name="ResetConfirmPassword" type="password"
id="ResetConfirmPassword" style="width:250px;" />
<span id="Comparevalidator2" controltovalidate="ResetPassword"
errormessage="Passwords Do Not Match"
evaluationfunction="CompareValidatorEvaluateIsValid"
controltocompare="ResetConfirmPassword" controlhookup="ResetConfirmPassword"
style="color:Red;visibility:hidden;">Passwords Do Not Match</span></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor1">
<td align="right"></td>
<td>
<input id="ResetMustChangePassword" type="checkbox"
name="ResetMustChangePassword" checked="checked" /><label
for="ResetMustChangePassword">User Must Change Password on Next
Login</label></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor0">
<td align="center" colspan="2">
<input type="submit" name="Reset" value="Reset Password" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="Reset" />&nbsp;&nbsp;
<input type="submit" name="Cancel2" value="Cancel" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="Cancel2" /></td>
</tr>
</table>

</div>
<script language="javascript" type="text/javascript">
<!--
var Page_Validators = new Array(document.all["Comparevalidator2"]);
// -->
</script>


<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer
== "125"))
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
return true;
}
// -->
</script>


</form>

</td>
</tr>
</table>

</body>
</html>
 
Last edited by a moderator:
G

Guest

Ben,

I feel you pain, had the same problem after installing 2.0. The apps in 1.1
did not work well and
postbacks were not working, I hope that's not the problem becuase I had to
rebuild the whole computer!!

Al
 
P

Peter Blum

This sounds like a bug found ASP.NET 1.1 SP 1's client-side validation code.
See the first topic of this article to solve it: http://aspalliance.com/699.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

> This is a repost, But I have some new information.

I have a server that is configured for .NET 1.1 and 2.0. For some reason
all my postback events for aren't firing when using .NET 1.1. Under IIS
in
ASP.NET tab, if i switch to 2.0 then the events fire correctly, but my
code
is not set up for that so i get some random errors. And when i switch
back
to 1.1 my events still don't fire

Anyone know why my post backs are not firing in 1.1?

NEW INFO:
It is only submit buttons that are failing on pages with a validator.
Here is a sample of the source code from the Reset Password Page that has
a comparevalidator

SOURCE OUTPUT:

<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<title>title</title>
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<link href="../screen.css" type="text/css" rel="stylesheet"
media="screen">
<link href="../print.css" type="text/css" rel="stylesheet" media="print">
<script language="javascript" defer>
function togglePasswords(show)
{
displayText = show ? "" : "none";

if (document.getElementById('passwordRow1')!=undefined)
{
document.getElementById('passwordRow1').style.display = displayText;
document.getElementById('passwordRow2').style.display = displayText;
document.getElementById('passwordRow3').style.display = displayText;
document.getElementById('passwordRow4').style.display = displayText;
}
}
</script>
</head>
<body bottommargin="0" leftmargin="0" background="../images/scanline.gif"
topmargin="0"
rightmargin="0">

<table border="0" cellpadding="0" cellspacing="0" width="100%"
height="100%">
<tr>
<td width="25" rowspan="4"><img src="../images/spacer.gif" width="25"
height="1"></td>
<td background="../images/right-side.gif" width="7" rowspan="4"><img
src="../images/spacer.gif" width="7"></td>
<td width="100%" height="115" bgcolor="#ffffff">
<table width="100%" height="115">
<tr>
<td rowspan="2">
<object id="logo2"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
height="115" width="200" align="middle"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
viewastext>
<param name="_cx" value="5292">
<param name="_cy" value="3043">
<param name="FlashVars" value="">
<param name="Movie" value="../flash/logo2.swf">
<param name="Src" value="../flash/logo2.swf">
<param name="WMode" value="Window">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value="">
<param name="Menu" value="-1">
<param name="Base" value="">
<param name="AllowScriptAccess" value="sameDomain">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value="FFFFFF">
<param name="SWRemote" value="">
<param name="MovieData" value="">
<param name="SeamlessTabbing" value="1">
<embed src="../flash/logo2.swf" quality="high" bgcolor="#ffffff"
width="200" height="115"
name="logo2" align="middle" allowscriptaccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td align="right" valign="top"><a href="http://www.site.com/"
target="websites"><img src="../images/logo.gif" border="0" width="89"
height="40"></a></td>
</tr>
<tr>
<td align="right"><!-- Change Product Place Holder -->
<a href="default.aspx">Home</a>&nbsp;
<a href="login.aspx?logout">Logout</a></td>
</tr>
</table>
</td>
<td background="../images/left-side.gif" width="7" rowspan="4"><img
src="../images/spacer.gif" width="7"></td>
<td width="25" rowspan="4"><img src="../images/spacer.gif" width="25"
height="1" rowspan="3"></td>
</tr>
<tr>
<td width="100%" height="37" background="../images/div-bar.gif"><img
src="../images/spacer.gif" height="37" width="1"></td>
</tr>
<tr>
<td width="100%" height="100%" bgcolor="#ffffff" align="center"
valign="top">


<br>
<form name="_ctl0" method="post" action="users.aspx"
language="javascript" onsubmit="if (!ValidatorOnSubmit()) return false;"
id="_ctl0">
<input type="hidden" name="__VIEWSTATE"
value=""
/>

<script language="javascript" type="text/javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>


<div id="passwordPanel" designtimedragdrop="576">

<table cellspacing="0" cellpadding="4" width="80%" border="0">
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
<tr>
<td class="bgHeader" align="center" colspan="2">Reset Password</td>
</tr>
<tr>
<td bgcolor="#000000" colspan="5" height="1"></td>
<tr class="rowColor1">
<td align="right">Password:</td>
<td>
<input name="ResetPassword" type="password" id="ResetPassword"
style="width:250px;" /></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor0">
<td align="right">Confirm Password:</td>
<td>
<input name="ResetConfirmPassword" type="password"
id="ResetConfirmPassword" style="width:250px;" />
<span id="Comparevalidator2" controltovalidate="ResetPassword"
errormessage="Passwords Do Not Match"
evaluationfunction="CompareValidatorEvaluateIsValid"
controltocompare="ResetConfirmPassword"
controlhookup="ResetConfirmPassword"
style="color:Red;visibility:hidden;">Passwords Do Not Match</span></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor1">
<td align="right"></td>
<td>
<input id="ResetMustChangePassword" type="checkbox"
name="ResetMustChangePassword" checked="checked" /><label
for="ResetMustChangePassword">User Must Change Password on Next
Login</label></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="2" height="1"></td>
</tr>
<tr class="rowColor0">
<td align="center" colspan="2">
<input type="submit" name="Reset" value="Reset Password" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="Reset" />&nbsp;&nbsp;
<input type="submit" name="Cancel2" value="Cancel" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="Cancel2" /></td>
</tr>
</table>

</div>
<script language="javascript" type="text/javascript">
<!--
var Page_Validators = new Array(document.all["Comparevalidator2"]);
// -->
</script>


<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer
== "125"))
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
return true;
}
// -->
</script>


</form>

</td>
</tr>
</table>

</body>
</html>
 
Last edited by a moderator:
B

Ben Dewey

Thanks that helped. I had the asp_net/system_web/1.1.xxx/WebUiValidation.js
file there from the old server. I thought they were good, but apparently
those files have been updated by MS on the new install.

I copied the most recent files from Win/Ms.NET/Frame/v1.1.xxx/ASPClientFiles
and everything worked

Thanks
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top