Preserving form elements' contents in an asp:placeholder?

G

Guest

I want to create a data entry form consisting of X rows of HTML input
fields. X = number of rows that the user will determine when the web page is
running.

I was able to use an asp:placeholder control and put input tags into the
control using LiteralControl (to preserve my HTML formatting preceisely the
way I want it), but I discovered that I cannot take advantage of the .NET
framework to remember the contents of the input fields if I do it this way.

Is there a way to produce this effect? Am I going to have to add
HTMLInputText controls to the placeholder?

Thanks.
 
C

Chris Priede

Hi,
I was able to use an asp:placeholder control and put input tags into
the control using LiteralControl (to preserve my HTML formatting
preceisely the way I want it), but I discovered that I cannot take
advantage of the .NET framework to remember the contents of the input
fields if I do it this way.

This is a classic problem with ASP.NET controls created at runtime and has
been discussed a lot, along with solutions. I doubt I could say it any
better, so please don't take the Google search response as unfriendly --
just pick one of the top results. :)

http://www.google.com/search?hl=en&lr=&q=dynamically+created+controls+ViewState
 
G

Guest

Hi Chris,
Thanks for suggesting some Google keywords. I didn't know what keywords
would be relevant for tihs search. This will help me do some further
research.

Thanks.

--Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top