aspnetform and master pages

  • Thread starter Thread starter bm
  • Start date Start date
B

bm

Does anyone know how to get a form's name to be anything other than
"aspnetform" when using master pages?

Thanks,

Brent

beta 2
 
Name it whatever you want and try to access it by name using the FindControl
method. It sounds like you are reading the name used by the compiler which
can be read using Trace. I wouldn't have much more to say.

<%= Clinton Gallagher
 
Clinton,

Allow me to clarify.

The problem is that i have a lot of javascript that references the form
id/name -- on the client side. I prefer not to have to change the form
id/name all over the place if i can simply get asp.net to name it what i've
told it to name it.

I've got a form in a page that's using a master page. The form looks like
so:

<form runat=server id=MyForm>

what gets rendered on the client is:

<form id=aspnetForm action=somepage.aspx method=post>

thus all of my javascript that references MyForm.somejavascriptfct is
invalid.

So i dont think that a server side use of FindControl will help here.

Thanks,

Brent
 

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

Back
Top