Microsoft KB Archive/817779

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

Article ID: 817779

Article Last Modified on 10/11/2005

-

APPLIES TO


 * Microsoft .NET Framework 1.0
 * Microsoft ASP.NET 1.0

-



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



SYMPTOMS
When the following conditions exist, you may receive a client-side script error in Netscape or in Microsoft Internet Explorer:   You add the folowing form to a user control:   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: 

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: function __doPostBack(eventTarget, eventArgument) {

var theform;

if (window.navigator.appName.toLowerCase.indexOf(&quot;netscape&quot;) > -1) {

theform = document.forms[&quot;_ctl14:Form1&quot;];

}

else {

theform = document._ctl14:Form1;

}

theform.__EVENTTARGET.value = eventTarget.split(&quot;$&quot;).join(&quot;:&quot;);

theform.__EVENTARGUMENT.value = eventArgument;

theform.submit; }

Notice that the Form has a uniqueID property that contains a colon in the following lines:

theform = document.forms[&quot;_ctl14:Form1&quot;];

theform = document._ctl14:Form1; ASP.NET replaces the colon with an underscore ( _ ) character to address the problem.



RESOLUTION
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:

http://support.microsoft.com/contactus/?ws=support

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



STATUS
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.

Keywords: kbbug kbfix kbqfe kbnetframe100presp3fix kbhotfixserver KB817779

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.