Dynamically Controlled Drop Down

Results 1 to 2 of 2

Thread: Dynamically Controlled Drop Down

  1. #1
    Join Date
    Dec 1969

    Default Dynamically Controlled Drop Down

    Need to create a drop down box that pulls it&#039;s contents from a database. i know how to handle this in classic asp, not sure where to start in .net with the runat=server etc. <BR><BR>Anyone have a quick start - step by step guide or any hints to get me started. Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamically Controlled Drop Down

    HI,<BR><BR>Here is the code.<BR><BR>Dim conn as SqlConnection<BR>Dim ds as new Dataset<BR>Dim adap as SqlDataAdapter<BR><BR>conn=new SqlConnection("Server=server1;database=data1;uid=s a;pwd=;")<BR>adap=new SqlDataAdapter("Select code,desc from table1",deomconn)<BR>adap.fill(ds)<BR>dropdown1.da tasource=ds<BR>dropdown1.databind()<BR><BR>Enjoy<B R><BR>Kshitij<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts