Go Back   CP Web Hosting - reseller hosting > Server Scripting > .NET
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2007, 12:32 AM
1R1 1R1 is offline
Senior Member
 
Join Date: Mar 2007
Posts: 163
Default variable

hi forum
i tried to create a set of form fields in a loop, hence the id's were something like: fname1, lname1, city1, fname2, lnam2, city2 etc. Now what i need is to loop through the values so that i can store them in a database.
Anyways of doing this plzz suggest!!!!!!!!!!!
Reply With Quote
  #2 (permalink)  
Old 07-15-2007, 12:36 AM
Senior Member
 
Join Date: May 2007
Posts: 151
Default Re:variable

Hi , use the and try the below code hope this as answer to ur prob ,this code will return a Control object that you will need to cast into whatever type control you are dealing with. If the control was not found, it will return null .
the code is as:
ParentControl.FindControl("fname" + i.ToString())
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0