Doug Reilly's Weblog

Embedded Reporting of the Information Age...

Problem with ASP.NET 1.1 and __doPostBack JavaScript function...

Well, this may be old news for some, but it certainly is new news for me.  I was working with the MS MasterPages sample and discovered a problem with the JavaScript that ASP.NET 1.1 was generating (there was an invalid field name created in the JavaScript - there was a colon embedded in the field name). 

Apparently, the problem is that I was defining a form inside a user control (that is the way things are implemented in the MS Master Pages example) and that causes a problem in ASP.NET 1.1.

Here is a MS KB article about the problem.  The fix is something you must get directly from MS.  Andy Smith also has a version on his site that works correctly with 1.1 as well.

Comments

Victor Garcia Aprea said:

Yup, its a nasty bug that managed to slip into the released 1.1 bits. There are many unofficial patches out there to somewhat "fix" this, but I suggest you go for the released MS patch.
# August 28, 2003 3:54 PM

TrackBack said:

# August 28, 2003 4:30 PM

Paul Wilson said:

My version of MasterPages also doesn't have this problem, since it avoids the naming containers that causes the problem:

http://www.aspalliance.com/PaulWilson/Articles/?id=14
# August 28, 2003 6:01 PM

Douglas Reilly said:

I have both gotten the MS fix, and I have converted to using Andy Smith's MasterPages, and while the JavaScript syntax error is gone, I am still having difficulties with the first really complex page I am doing is a MasterPage system.

I am setting up a RadioButtonList with an SelectedItemChanged handler, and a couple of buttons on the form with handlers. The RadioButtonList has Autopostback=true, and the postback occurs, however while the Page_Load gets called the SelectedItemChanged never gets called. The code that assigns the delegate definitely gets called.

I do like the idea of the MasterPages, but the ugliness in designer mode, and this kind of problem is makeing me nuts.

Sigh.
# August 28, 2003 8:25 PM

TrackBack said:

# August 29, 2003 12:08 PM

daz said:

So can anyone help me out and send me th MS bug fix?
# February 15, 2004 8:21 PM

Doug Reilly said:

You need to get the fix from MS.
# February 15, 2004 10:17 PM

Chains said:

I need this fix!! Please someone help me!! I can't get it from MS. I can't find it!!

Send me some info at: rzzanini@hotmail.com

Thanks!! =)
# March 24, 2004 9:58 AM

Doug Reilly said:

The only way to legally get it is through PSS. Did you point them to the KB article I posted a link to?
# March 24, 2004 11:28 AM

Bryan said:

how do you get ahold of MS to get this fix? I get this error on the second postback. I have a table with links created in a custom control. As soon as you click one of the link buttons it suddenly gives the "This Page Cannot Be Displayed" and this is inserted into the address bar "javascript:_doPostBack('_ctl1$lnkCategoryPizza','')" Is there any other way then the patch?

Thanks,
Bryan
# April 23, 2004 5:36 PM

Todd said:

I tried Wilson's work-around and found that it was buggy on some more complicated pages. I downloaded the hotfix and it worked like a charm.

Get it here:
http://support.instantasp.co.uk/shwmessage.aspx?forumid=25&messageid=654
# June 28, 2004 6:57 PM

Doug Reilly said:

I had gotten the hotfix as well, but decided to use Metaware's solution, because deploying the hotfix on the production server was more trouble than it was worth...
# June 28, 2004 7:39 PM

chris said:

how do i destroy that bug
# July 13, 2004 4:16 PM

Doug Reilly said:

Get the hotfix mentioned above, or look on www.metabuilders.com for their solution.
# July 13, 2004 4:32 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)