Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if Form Element Exists 1

Status
Not open for further replies.

grande

Programmer
Feb 14, 2005
657
CA
Hi again,

I was wondering if there was a way to check if a form element exists based on the name of the element, other than looping through all the controls.

I tried FormName.Controls["ElementName"], but Controls expects an int.

Any help would be great,
- Grande.

-------------------------
Call me barely Impressive Captain.
 
why not use the Form.FindControl("controlname") instead?


Affleck

there are 10 types of people in this world those who understand binary, and those who don't.
 
Awesome! That's exactly what I was looking for!

-------------------------
Call me barely Impressive Captain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top