Simple question: Retrieve form elements name in content placeholder

  • Thread starter Thread starter Kees de Winter
  • Start date Start date
K

Kees de Winter

Hi,

If I have a TextBox place inside a content placeholder then at runtime the
TextBox's name changes to ctl00_ContentPlaceHolder1_tbCity. What is the best
way to get the value of the TextBox server-side without 'guessing' the name
in the produced HTML?
Page.Request("??")

Thanks
 
u don't :)

2.0 supports crostpass postback.

The only solution I can think of to get out of your mess is
(a) don't use server controls
(b) do some crazy javascript stuff to either change the names or copy values
into hidden form fields that you do know the name...this solution sucks :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/


Kees de Winter said:
Thanks Karl,

Thank you for the quick answer.
One more question: if the form is posted to another page, then the
variable
myTextBox will be unknown. How to retrieve a Form elements value then?

Thanks
 

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