[Mono-bugs] [Bug 566541] New: Empty HtmlForm produces JavaScript Code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 21 17:02:46 EST 2009



           Summary: Empty HtmlForm produces JavaScript Code
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: sky.rage at yahoo.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other
           Blocker: No

Description of Problem:
A webform with an empty HtmlForm (<form runat="server"></form>)
produces javascript code which isn't needed.

Normally ASP.NET adds this javascript code only if there is a component that
needs that (such as FieldValidators or ASP.NET Ajax)

The input looks like that:
<%@ Page Language="C#" %>
        <form runat="server">


The output looks like that:
        <form method="post" action="test.aspx" id="ctl00">
<script type="text/javascript">
    var theForm;
    if (document.getElementById) { theForm = document.getElementById ('ctl00');
    else { theForm = document.ctl00; }
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="DAAAAA=="



Assembly: System.Web
Namespace: System.Web.UI
Class: Page

The method that produces the code is:

Steps to reproduce the problem:
1. Create a new "Empty Webapplication Project"
2. Create a Webform (without codebehind!) called test.aspx or something like
3. Copy following code in your file

<%@ Page Language="C#" %>
        <form runat="server">


4. Run it in your browser and look at the document source
5. If you don't believe, make this steps with microsofts ASP.NET and compare
the output

Actual Results:

Expected Results:

How often does this happen? 

Additional Information:
Webserver: xsp
Language: C#
IDE: MonoDevelop 2.2

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list