Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Getting the values of dynamically generated text boxes.Getting the values of dynamically generated text boxes.
Previous
 
Next
New Post
10/29/2007 10:28 AM
 

I have generated n number of textboxes during run time as follows..

dim txt_bonus as textbox
for i = 0 to n
     txt_bonus = New textbox()
     txt_bonus.Id = "Bonus" & i

     Panel1.Controls.Add(txt_bonus)    
next

So now there are n number of textboxes.   But I am facing a problem of retrieving the values 
of those textboxes.

Anyone help me out on this one..

Thanks in advance...

 

 

 

 

 

 
New Post
10/29/2007 2:23 PM
 

Without additional details it is hard to pinpoint exactly where the problem lies, but the general rule is that dynamically created controls must be re-created on each postback (as early as possible in the page/control life-cycle that is, in the Init event or an override of the CreateChildControls method). This way they can be accessed to return values and participate in the page/control's viewstate.  You'll also need to persist the value of "n" so as to know how many text boxes to re-create each time.

If you're already doing this, post your textbox value retrieval code (and in response to what event it is being run) so we can better assist.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
10/30/2007 1:38 AM
 

Thanks ImageMaker...

This is what I do to generate the text boxes at run time.  
User uploads an excel file and depending upon the number of employees (i.e. n) in that excel sheet I generate 'n' number of text boxes.  Now on clicking the "Save" button I need to save the values of those run time created text boxes in database.  

Here the problem arises...   I dont know how to retrive the value from those textboxes in DNN.   If you can help me and provide me with samples of how to proceed on..  it wud be of much help to me..  

 

 
New Post
10/30/2007 2:25 AM
 

Also see:

DynamicForms



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Getting the values of dynamically generated text boxes.Getting the values of dynamically generated text boxes.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out