Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2005, 11:18 PM
Registered User
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Newbie HELLLPPPP.... Textbox and DropdownList

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...
 
Old September 30th, 2005, 11:40 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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


 
Old October 2nd, 2005, 11:48 PM
Registered User
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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...
 
Old October 3rd, 2005, 12:20 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
pointing cursor from one textbox to other textbox lakshmi_annayappa ASP.NET 1.0 and 1.1 Basics 2 August 2nd, 2007 03:41 PM
adding dropdownlist item to a textbox alto ASP.NET 2.0 Basics 2 May 24th, 2007 01:14 AM
How can i change the textbox into a dropdownlist saif44 ASP.NET 2.0 Basics 1 March 5th, 2006 04:20 PM
Newbie Q - DropDownList Binding spuckle ASP.NET 2.0 Basics 1 March 2nd, 2006 12:23 AM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.