PC Review


Reply
Thread Tools Rate Thread

Dynamic forms with input boxes added at run time.

 
 
=?Utf-8?B?QXJuZSBHYXJ2YW5kZXI=?=
Guest
Posts: n/a
 
      5th Oct 2007
I am programming input forms in Asp.net 2.0
Some textboxes are static on the form and viewstate works fine.
Some textboxes have to be dynamically added to the form at run-time which
makes viewstate difficult to maintain. Sometimes I have got viewstate to
magically work. Sometime I have to manually restore viewstate.
What is the best way to deal with dynamically created input boxes?

--
Arne Garvander
Certified Geek
Professional Data Dude
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      5th Oct 2007
Whenever a page posts back, you must recreate any dynamically added controls
and ensure they have the same ID property they had when you first created
them.
Setting EnableViewState to true helps too.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"Arne Garvander" wrote:

> I am programming input forms in Asp.net 2.0
> Some textboxes are static on the form and viewstate works fine.
> Some textboxes have to be dynamically added to the form at run-time which
> makes viewstate difficult to maintain. Sometimes I have got viewstate to
> magically work. Sometime I have to manually restore viewstate.
> What is the best way to deal with dynamically created input boxes?
>
> --
> Arne Garvander
> Certified Geek
> Professional Data Dude

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read input value from dynamic created input controls Melissa Microsoft Dot NET Framework 1 26th Dec 2008 08:48 AM
Read input value from dynamic created input controls Melissa Microsoft ASP .NET 2 26th Dec 2008 08:48 AM
How do I add input data in the input ranges in drop down boxes. oil_driller Microsoft Excel Misc 1 9th Nov 2005 11:31 PM
Application.Run(<ApplicationContext>) Error 'Item has already been added. Key in dictionary: "- 1" key being added: "- 1"' Ralf Gedrat Microsoft VB .NET 0 3rd May 2005 10:58 AM
Mask input in input boxes? =?Utf-8?B?RXJpYw==?= Microsoft Excel Programming 4 29th Nov 2003 12:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:19 AM.