Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

not sure if i should post this in windows forms, ASP.NET, or Database, so i'll just drop it here :D

 

i read data in a database, and get it all out via a SqlDataReader. I would like to dynamically create Controls and fill them with my Data. My problem is that i don't know how to access my freshly-created control (to fill it with text, for example. see sample code)

 

while (dr.Read()) 
{
   Panel1.Controls.Add(new TextBox());
   // then what ?
}

 

any hints ?

 

thank you !

 

Huby.

there are 10 kinds of people on earth:

those who understand binary, and those who don't.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...