Subject: Newbie HELLLPPPP.... Textbox and DropdownList
Posted By: sane79 Post Date: 9/29/2005 11:18:48 PM
Hi all..
I'm very new to asp.net.. and I'm having trouble starting my application!!!!
The problems I'm facing shld sound simple to some of u.. but it has me stuck for 3 weeks already!
I'm using Web Matrix and VB script to do my programming.
These are the 2 issues I'm facing...

1)How do I display the system date in a web control Textbox?

2)How do I get a web control dropdown list to display all items in a database field. Assuming I have a dropdownlist called "LstStatus" and In my Database called "DBTEST", I have a Table Called "Master_Status" and a Field called "TT_Status"

Can someone pls help me... and u may need to tell me step by step on how to do it.. as I'm really lost in asp.net...
Thanks...

-Sane...going insane...
Reply By: jbenson001 Reply Date: 9/30/2005 11:40:40 PM
1. textbox1.text = TextBox1.Text = Date.Today

2. Drop a sqldataadapter onto your form.  A wizard will start.  Construct your sql statement and connection properties.  Then generate a dataset from the sqldataadapter.  In your code behind, use the sqldataadapter to fill your dataset.  Set your dropdownlist's datasource property to the dataset.

There are many examples in the help files as well as on the internet


Reply By: sane79 Reply Date: 10/2/2005 11:48:55 PM
Hi, Thanks for your reply.
Sorry.. a few more questions on my side:
1) textbox1.text = TextBox1.Text = Date.Today
   Do i do that in HTML or aspx coding?
   Can u show me an example pls?
2)I can't find the sqldataadapter. What I have is just a SQLDataSourceControl.
Are they the same.. cos I do not have a wizard when I dragged the control into my design view form.. :(

-Sane...going insane...
Reply By: jbenson001 Reply Date: 10/3/2005 12:20:16 AM
1.  That goes in  your code behind page, just use the code as it is.
2.  Depending on your SQL source,  you have to choose it from the data tab in the toolbox.  SQLDataAdaper is under there as well as other data sources.


Go to topic 35315

Return to index page 461
Return to index page 460
Return to index page 459
Return to index page 458
Return to index page 457
Return to index page 456
Return to index page 455
Return to index page 454
Return to index page 453
Return to index page 452