Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: dynamically creating server controls


Message #1 by "Paul Riley" <paul.riley@s...> on Tue, 5 Nov 2002 15:31:53 -0000
OK this is a difficult one to explain but I am creating a page which can
take any query and display the fields in that query as updateable
fields. I could do this via a datagrid but I need to be able to change
what type of server controls are for what field (eg "date" my have a
combo box of possible answers and so on) and I also want it to be
displayed as a list (ie down the page not along). 
The problem comes when I want each control to have it's name defined by
the field name of the data. So if I was selecting ID, fname, deptno I
want to create three server controls one called ID, one called fname and
so on. I can do this by response.writes but I'd like to have server side
functionality from them without checking frm form collections (eg don't
want to use response.write("<input type=""textbox"" value=" &
request.form("ID") & " name=""ID""/>"))
 
Is what I want to do possible and if so how???
 
Many thanks for the help in advance


  Return to Index