Error: Inserting an ASP.NET control will convert the HTML form

Discussion in 'ASP .Net Web Controls' started by Tom Wilkerson, Feb 5, 2010.

  1. Whenever I drop a ASP.NET control on the .aspx page, I kept getting this
    popup.
    Inserting an ASP.NET control will convert the HTML form in the page to an
    ASP.NET form and remove its current properties. Do you want to insert the
    ASP.NET control?

    Answering YES removes the html properties and causes many errors.
    Consequently, I am unable to add new fields to the .aspx form using the
    design view.

    I have upgraded to SP1 and checked other references but could not make these
    work for me.

    http://forums.asp.net/p/1465942/3383884.aspx
    http://forums.asp.net/p/1229424/2223548.aspx

    Is there a setting in Visual Studio 2008 to prevent converting the html form
    to asp.net form? Other fix or change?

    Here's a little of the request.aspx.cs as a reference to you. Thanks for
    your help.

    <%@ Page Language="C#" EnableEventValidation="false" validateRequest='false'
    AutoEventWireup="true" CodeFile="Copy of Request.aspx.cs"
    Inherits="Composer.RequestPage"%>
    <%@ Register Src="StdFooter.ascx" TagName="StdFooter" TagPrefix="uc3" %>
    <%@ Register Src="index.ascx" TagName="Main" TagPrefix="uc1" %><!DOCTYPE
    html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <style type="text/css"> .style6
    {
    width: 121px;
    }
    .style7
    {
    width: 126px;
    }
    </style> <html xmlns="http://www.w3.org/1999/xhtml"><head
    id="composerhead"
    runat="server"><title>ComposComposComposComposer</title><ufy:Application
    runat="server" id="_ComposerApp"></ufy:Application>
    </head>
    <body>
    <ufy:Body id="_body_" runat="server">
    <form action="" id="composer" ondblclick="doDoubleClick();"
    runat="server" style='background-color: #f7f7f7; height: 100%; width: 100%'>
    <ufy:SplitPane id="_ComposerSplitPane" runat="server">
    <ufy:SplitPanePanel id="_ComposerOutline" runat="server">
    <uc1:Main id="indexpage" runat="server"></uc1:Main>
    </ufy:SplitPanePanel>
    <ufy:SplitPanePanel cssclass="splitpane"
    id="_ComposerContent" runat="server">
    <div class="menu_container">
    <asp:Menu backcolor="navy" cssclass="formmenu"
    id="ComposerMenu" orientation="horizontal" runat="server" skinid="mainMenu">
    <Items >
    <asp:MenuItem
    imageurl="images/actn029.gif" text="Edit the Document" value="Edit"/>
    <asp:MenuItem
    imageurl="images/actn021.gif" text="Save" value="ActSave"/>


    --
    Tom
     
    Tom Wilkerson, Feb 5, 2010
    #1
    1. Advertising

  2. In order to use ASP.NET controls, you must also be using an ASP.NET form.
    The reason for this has to do with the postback process. I would recommend
    starting with an ASP.NET form. All the attributes that can be added to an
    HTML form can also be added to an ASP.NET form; if they are not actual
    properties of the ASP.NET form control, they will be items in the form's
    Attributes property. Keep in mind that if an attribute is added in design
    view that is not a property, it will be passed through as is when the HTML
    is generated. For example, in your HTML form you include:

    ondblclick="doDoubleClick();"

    Even though this is not a property of the ASP.NET form, you can include it
    the same way and it will pass through when the HTML is generated so that
    your generated form tag will have the ondblclick attribute. Hopefully this
    all helps.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Tom Wilkerson" <> wrote in message
    news:...
    > Whenever I drop a ASP.NET control on the .aspx page, I kept getting this
    > popup.
    > Inserting an ASP.NET control will convert the HTML form in the page to an
    > ASP.NET form and remove its current properties. Do you want to insert the
    > ASP.NET control?
    >
    > Answering YES removes the html properties and causes many errors.
    > Consequently, I am unable to add new fields to the .aspx form using the
    > design view.
    >
    > I have upgraded to SP1 and checked other references but could not make
    > these
    > work for me.
    >
    > http://forums.asp.net/p/1465942/3383884.aspx
    > http://forums.asp.net/p/1229424/2223548.aspx
    >
    > Is there a setting in Visual Studio 2008 to prevent converting the html
    > form
    > to asp.net form? Other fix or change?
    >
    > Here's a little of the request.aspx.cs as a reference to you. Thanks for
    > your help.
    >
    > <%@ Page Language="C#" EnableEventValidation="false"
    > validateRequest='false'
    > AutoEventWireup="true" CodeFile="Copy of Request.aspx.cs"
    > Inherits="Composer.RequestPage"%>
    > <%@ Register Src="StdFooter.ascx" TagName="StdFooter" TagPrefix="uc3" %>
    > <%@ Register Src="index.ascx" TagName="Main" TagPrefix="uc1" %><!DOCTYPE
    > html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <style type="text/css"> .style6
    > {
    > width: 121px;
    > }
    > .style7
    > {
    > width: 126px;
    > }
    > </style> <html xmlns="http://www.w3.org/1999/xhtml"><head
    > id="composerhead"
    > runat="server"><title>ComposComposComposComposer</title><ufy:Application
    > runat="server" id="_ComposerApp"></ufy:Application>
    > </head>
    > <body>
    > <ufy:Body id="_body_" runat="server">
    > <form action="" id="composer" ondblclick="doDoubleClick();"
    > runat="server" style='background-color: #f7f7f7; height: 100%; width:
    > 100%'>
    > <ufy:SplitPane id="_ComposerSplitPane" runat="server">
    > <ufy:SplitPanePanel id="_ComposerOutline"
    > runat="server">
    > <uc1:Main id="indexpage" runat="server"></uc1:Main>
    > </ufy:SplitPanePanel>
    > <ufy:SplitPanePanel cssclass="splitpane"
    > id="_ComposerContent" runat="server">
    > <div class="menu_container">
    > <asp:Menu backcolor="navy" cssclass="formmenu"
    > id="ComposerMenu" orientation="horizontal" runat="server"
    > skinid="mainMenu">
    > <Items >
    > <asp:MenuItem
    > imageurl="images/actn029.gif" text="Edit the Document" value="Edit"/>
    > <asp:MenuItem
    > imageurl="images/actn021.gif" text="Save" value="ActSave"/>
    >
    >
    > --
    > Tom
     
    Nathan Sokalski, Feb 5, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jensen bredal
    Replies:
    3
    Views:
    7,580
    M. Posseth
    Jun 16, 2004
  2. Sachin
    Replies:
    1
    Views:
    3,023
    Simon Brooke
    Sep 29, 2006
  3. sains23
    Replies:
    0
    Views:
    695
    sains23
    May 29, 2008
  4. Nicolas
    Replies:
    1
    Views:
    117
    Nicolas
    Jul 21, 2004
  5. ste-m
    Replies:
    1
    Views:
    349
Loading...

Share This Page