Master Pages and changin ID of form tag !!

Discussion in 'ASP .Net' started by madani, Oct 25, 2005.

  1. madani

    madani Guest

    Hi,

    I'm using Framework V2.0 beta 2, I useed a master page, and a content
    page.

    I put my FORM tag in master page, and I set id of FORM tag to something
    like "form1" but when I view source of rendered page, I saw that
    ASP.NET chaned id of FORM tag to "aspnetForm".

    I mean I have this tag in master page file :

    <form id="form1" runat="server">

    but after page is rendered, ASP.NET Changed it to :

    <form method="post" action="Default.aspx" id="aspnetForm">

    as you see id attribute of Form tag is changed.

    Is name of forms a static "aspnetFrom" string ?, so I can use it in my
    client scripts, or this is a asp.net 2.0 beta 2 bug ?

    -madani
    madani, Oct 25, 2005
    #1
    1. Advertising

  2. Not sure, as I have not played in this manner. From JavaScript, you can
    always access the zero item in the forms collection and avoid naming issues.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************


    "madani" wrote:

    > Hi,
    >
    > I'm using Framework V2.0 beta 2, I useed a master page, and a content
    > page.
    >
    > I put my FORM tag in master page, and I set id of FORM tag to something
    > like "form1" but when I view source of rendered page, I saw that
    > ASP.NET chaned id of FORM tag to "aspnetForm".
    >
    > I mean I have this tag in master page file :
    >
    > <form id="form1" runat="server">
    >
    > but after page is rendered, ASP.NET Changed it to :
    >
    > <form method="post" action="Default.aspx" id="aspnetForm">
    >
    > as you see id attribute of Form tag is changed.
    >
    > Is name of forms a static "aspnetFrom" string ?, so I can use it in my
    > client scripts, or this is a asp.net 2.0 beta 2 bug ?
    >
    > -madani
    >
    >
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Oct 25, 2005
    #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. Doug McCann
    Replies:
    1
    Views:
    1,006
    William Brogden
    Aug 5, 2004
  2. shruds
    Replies:
    1
    Views:
    791
    John C. Bollinger
    Jan 27, 2006
  3. Replies:
    1
    Views:
    3,202
    PeterKellner
    May 16, 2006
  4. pontocom

    Changin the Soap Header in the client request

    pontocom, Oct 18, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    173
    pontocom
    Oct 19, 2005
  5. WindAndWaves

    changin the onclick link

    WindAndWaves, Dec 6, 2004, in forum: Javascript
    Replies:
    0
    Views:
    81
    WindAndWaves
    Dec 6, 2004
Loading...

Share This Page