Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2006, 01:25 AM
Authorized User
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default dynamically creating controls

I am facing following problem
Based on selection of dropdownlist in home page , i am creating a tabcontrol with some tabs on other page, and based on tab selection the related textboxes are created from database, this all i am doing in page_load event. now when i enter something with a particular tab selected,then clicks on next tab. but in doing that, the values previously entered in tab are lost as page_load event is called again and new controls are created for new tab selected, is there any way with page_init and viewstate, so that the values entered in first tab are preserved during other tab selection.

any pointers to it will be of great help


regards
rahul pokharna
__________________
regards
rahul pokharna
 
Old January 11th, 2006, 12:47 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You might want to try putting the contents of each tab in a placeholder of panel control that can be made invisible. This way they are still "on" the page and their state is maintained, but they just aren't seen.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me about dynamically created controls vingo_mail ASP.NET 2.0 Basics 1 March 24th, 2008 12:54 PM
Adding Controls Dynamically andyj00 C# 0 March 19th, 2007 08:54 AM
Creating controls dynamically Renu ASP.NET 1.0 and 1.1 Basics 9 December 19th, 2004 10:21 AM
Dynamically created controls katsarosj ASP.NET 1.0 and 1.1 Basics 4 February 4th, 2004 09:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.