Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic forms with input boxes added at run time.

Reply
Thread Tools

Dynamic forms with input boxes added at run time.

 
 
=?Utf-8?B?QXJuZSBHYXJ2YW5kZXI=?=
Guest
Posts: n/a
 
      10-05-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
 
      10-05-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

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
Space between input boxes and selection boxes is not the same in Internet Explorer Stefan Mueller HTML 5 06-16-2009 02:06 PM
Solution for posterity: GridView, Datakeys, and "Item has already been added. Key in dictionary: 'CategoryID' Key being added: 'CategoryID'" ASP .Net 2 11-02-2006 04:48 AM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
how come user control added to page doesn't get added to codebehind file? Bennett Haselton ASP .Net 1 11-08-2004 09:26 PM
WinXP - Can locations be added to the vertical icon bar in "Save As" dialog boxes ??? Computer Support 2 08-29-2003 12:39 AM



Advertisments