aspnetForm

R

Ron

How do I assign a name to the form element in a master page/ child page
situation?

I have included a name= in my form declaration...asp.net always changes it
to aspnetForm. Is there a way to override that behavior and apply my own
name?
 
R

Ron

I am building an application that uses a lot of Javascript. A lot of the
Javascript is adopted from another application and the form name is set.

There are numerous postbacks. Trying to reference the various elements with
all of the mangling going on is very difficult…I have eliminated all of the
controls (in favor of straight HTML), however, the use of master pages
requires the use of a runat-server form.

It is amazing to me...I don't understand why Microsoft tries to make a web
page development system look like a desktop development system. It just adds
a lot of complexity that has to be overcome if the developer does anything
that is "outside the box". I have worked with .net since before version 1.0
was released, and I have also worked with ColdFusion, PHP, and Perl. The
other development systems are a lot easier when an application comes along
that requires a lot of client side javascript.
 
R

Ron

Thanks!

Mark Rae said:
In ASP.NET, there can only be one server-side form (i.e. a <form> element
with the runat="server" tag), and its name will always be aspnetForm.

You don't need to specify the form container name to work with one of its
elements in client-side JavaScript.

E.g. if you have an <asp:TextBox /> web control called "MyTextBox, you would
do something like:



I disagree completely.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,426
Latest member
MrMet

Latest Threads

Top