Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Form Inside of a User Control Generates a Script Error

View products that this article applies to.

Note If you are experiencing this problem in the Microsoft .NET Framework 1.1, click the following article number to view the article in the Microsoft Knowledge Base:
818803 ( ) INFO: Post-RTM .NET Framework 1.1 ASP.NET Hotfix Package Symptoms

↑ Back to the top


When the following conditions exist, you may receive a client-side script error in Netscape or in Microsoft Internet Explorer:
  1. You add the folowing form to a user control:
    <form id="Form1"
    		  name="Form1" runat="server">
  2. You add the user control, for example, Workspace1, to a page.
An auto-generated script similar to the following script is added to the page:
<form name="Workspace1:Form1"
		  method="post" action="formtest2.aspx" id="Workspace1_Form1">

The script error occurs because the form name and the form ID are different, and because the form name contains a colon.

Another example of the problem in the auto-generated script for a __doPostBack function follows:
		  __doPostBack(eventTarget, eventArgument) { 
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["_ctl14:Form1"];
else {
theform = document._ctl14:Form1;
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;

Notice that the Form has a uniqueID property that contains a colon in the following lines:
theform =
theform = document._ctl14:Form1;
ASP.NET replaces the colon with an underscore ( _ ) character to address the problem.

↑ Back to the top


To resolve this problem, obtain Microsoft ASP.NET Hotfix Rollup package. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
818058� INFO: ASP.NET Hotfix Rollup
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next .NET Framework service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
 Date         Time  Version               Size  File name
03-Apr-2003  18:31  1.0.3705.419      196,608  Aspnet_isapi.dll
03-Apr-2003  18:26                      4,169  Aspnet_perf.h
03-Apr-2003  18:26                     20,468  Aspnet_perf.ini
03-Apr-2003  18:26                     20,342  Aspnet_perf2.ini
03-Apr-2003  18:31  1.0.3705.419       24,576  Aspnet_regiis.exe
03-Apr-2003  18:31  1.0.3705.419       28,672  Aspnet_wp.exe
03-Apr-2003  17:31  1.0.3705.419       69,632  Corperfmonext.dll
03-Apr-2003  17:29  1.0.3705.419      303,104  Mscorjit.dll
04-Apr-2003  06:20  1.0.3705.419    1,953,792  Mscorlib.dll
03-Apr-2003  17:22                     10,284  Mscorlib.ldo
03-Apr-2003  17:30  1.0.3705.419    2,269,184  Mscorsvr.dll
03-Apr-2003  17:30  1.0.3705.419    2,269,184  Mscorwks.dll
22-Aug-2002  19:23                         15  Smartnav.htm
22-Oct-2002  13:41                      8,728  Smartnav.js
04-Apr-2003  06:25  1.0.3705.419    1,191,936  System.web.dll

NOTE: This hotfix is part of a hotfix rollup:
KBLink:818058.KB.EN-US: FIX: ASP.NET Hotfix Rollup Includes: 818537,	818058, 816829 & 817779


↑ Back to the top


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

↑ Back to the top

Keywords: KB817779, kbbug, kbfix, kbnetframe100presp3fix, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 817779
Revision : 10
Created on : 10/11/2005
Published on : 10/11/2005
Exists online : False
Views : 470