ASP.NET __doPostBack javascript error

  • Thread starter Thread starter Alex Lein
  • Start date Start date
A

Alex Lein

I've got a series of 3 drop down menus that validate my
form. on my local win2k machine, the script works fine.
When i upload it to my win2k3 production server, the
__doPostBack function generates errors

its giving me for element names with colons (":") in it.
its trying to reference "mkn:header:navigation.dropdown1"

Ive found the problem in MSDN, its a problem with ASP.NET
the hotfix rollup from this article is what i need:
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;818803

however, when i try to get support from microsoft online,
they tell me my Product ID is invalid or not supported in
Canada or the USA.

where can i get this hotfix or is there another solution
to this problem?
 
Here is a workaround until you can find the fix. The problem is with the
colon. It needs to be an _ . You may need to change the control ids or
modify this for you particular need by the idea is to override the render
and replace the offending text.

Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

Dim _stringBuilder As StringBuilder = New StringBuilder()
Dim _stringWriter As StringWriter = New StringWriter(_stringBuilder)
Dim _htmlWriter As HtmlTextWriter = New HtmlTextWriter(_stringWriter)
MyBase.Render(_htmlWriter)
Dim html As String = _stringBuilder.ToString()
Dim start As Integer = html.IndexOf("document._ctl1:_ctl0;")
if start <> -1 then
html.Replace("document._ctl1:_ctl0", "document._ctl1__ctl0")
end if
writer.Write(html)

End Sub
 
Back
Top