ASP.NET Form - Postback bug or me being a dimwit?

  • Thread starter Thread starter Alex Shirley
  • Start date Start date
A

Alex Shirley

I'm probably being ignorant here but I've done this:

a)Created a aspx form which contains a radio button list as well as a
submit button

b)Set the radio button list to autopostback, the idea being that the
form will change when a radio button is hit (haven't coded this in
yet). This is the only control set for this behaviour.

I'm experiencing the following:

When compiling the page IE comes up with "Line 149: Char 29, Error:
Expected ‘;'
Code:0

On inspection of the html code generated it appears to be referring to
the following JavaScript that must have been generated by ASP.NET:

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


and

"theform = document._ctl10:frmSubscribe;"

appears to contain the error in question (missing ;).

Has anybody experienced this in Visual Studio 2003 (release version)
and do they know how to get around it (without comprising on browser
compatibility), considering the code is autogenerated.

I think I've covered the necessary, further details and code upon
request

Many Thanks!

Alex
 
Yeah, I read this, but it says it only applies to
Framework 1.0. I have removed Framework 1.0 (using
Add/Remove Programs) and am using 1.1 and VS .NET 2003
which says it uses Framework 1.1. I am still getting the
error. Our web tech won't install the HotFix until I can
prove that it affects 1.1 also. I have found nothing on
MSDN to prove this.

Does anyone know if this bug was supposed to be fixed in
Framework 1.1. Since the Knowledgebase article was just
posted a month ago, I doubt the fix was in 1.1, but I
can't prove it!

Thanks.
-----Original Message-----
Hi

["_ctl10:frmSubscribe"]; The ":" is the error
http://support.microsoft.com/default.aspx?id=818803

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
I'm probably being ignorant here but I've done this:

a)Created a aspx form which contains a radio button list as well as a
submit button

b)Set the radio button list to autopostback, the idea being that the
form will change when a radio button is hit (haven't coded this in
yet). This is the only control set for this behaviour.

I'm experiencing the following:

When compiling the page IE comes up with "Line 149: Char 29, Error:
Expected ';'
Code:0

On inspection of the html code generated it appears to be referring to
the following JavaScript that must have been generated by ASP.NET:

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


and

"theform = document._ctl10:frmSubscribe;"

appears to contain the error in question (missing ;).

Has anybody experienced this in Visual Studio 2003 (release version)
and do they know how to get around it (without comprising on browser
compatibility), considering the code is autogenerated.

I think I've covered the necessary, further details and code upon
request

Many Thanks!

Alex


.
 
According to the knowledgebase article that Vidar supplied:

INFO: Post-RTM .NET Framework 1.1 ASP.NET Hotfix Package Symptoms
The information in this article applies to:
Microsoft .NET Framework 1.1
Microsoft ASP.NET (included with the .NET Framework 1.1)

Think that answers your Q!

Now has anybody got that patch?

Cheers

Alex
 
Hi

Yes it does affect 1.1... read more carefully and you see the error is the
same
so get the fix

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
Bob said:
Yeah, I read this, but it says it only applies to
Framework 1.0. I have removed Framework 1.0 (using
Add/Remove Programs) and am using 1.1 and VS .NET 2003
which says it uses Framework 1.1. I am still getting the
error. Our web tech won't install the HotFix until I can
prove that it affects 1.1 also. I have found nothing on
MSDN to prove this.

Does anyone know if this bug was supposed to be fixed in
Framework 1.1. Since the Knowledgebase article was just
posted a month ago, I doubt the fix was in 1.1, but I
can't prove it!

Thanks.
-----Original Message-----
Hi

["_ctl10:frmSubscribe"]; The ":" is the error
http://support.microsoft.com/default.aspx?id=818803

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
I'm probably being ignorant here but I've done this:

a)Created a aspx form which contains a radio button list as well as a
submit button

b)Set the radio button list to autopostback, the idea being that the
form will change when a radio button is hit (haven't coded this in
yet). This is the only control set for this behaviour.

I'm experiencing the following:

When compiling the page IE comes up with "Line 149: Char 29, Error:
Expected ';'
Code:0

On inspection of the html code generated it appears to be referring to
the following JavaScript that must have been generated by ASP.NET:

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


and

"theform = document._ctl10:frmSubscribe;"

appears to contain the error in question (missing ;).

Has anybody experienced this in Visual Studio 2003 (release version)
and do they know how to get around it (without comprising on browser
compatibility), considering the code is autogenerated.

I think I've covered the necessary, further details and code upon
request

Many Thanks!

Alex


.
 
Just installed the patch supplied by MS and problem is now resolved.

Thanks Vidar!

Alex
 
Back
Top