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 February 22nd, 2006, 03:38 AM
Authorized User
 
Join Date: Apr 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Populate textbox with data retrieved from database

Hi,

I have a page name MyAccount.aspx, which displays the account info of members.

I would like to populate the textbox with the account info taken from database, and also give option for the member to modify the info, except username.

how can I do that using vb.net? Any help is appreciated.

Thanks.

Ai Ling

 
Old February 25th, 2006, 09:51 PM
Authorized User
 
Join Date: Mar 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

how many fields does each record contain?
do you want a TextBox for each field?
 
Old February 27th, 2006, 11:06 AM
Authorized User
 
Join Date: Dec 2005
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to g_vamsi_krish
Default

just get all the required values from the databse by using select stament and display in the fields.
or
use can also use repeator to show the details in data grid format.


vamsi
 
Old February 28th, 2006, 05:07 AM
Authorized User
 
Join Date: Apr 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

i use the datareader to display the data, and it works.

thanks.

ai ling

 
Old November 29th, 2006, 03:46 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I am new to .net world and developing an intranet application which has lots of form, and i have to autopopulat the textboxes from the database dpeending upon who has logged in. That is checking the userid and then on the basis of that autopopulating the textbox fields.
Your post looks similar to what i need, can you pl. exaplin the procedure in detail, or perhaps give some sample code to understand it. Any help wud be apprecaited.
Thanks!
 
Old November 30th, 2006, 12:13 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It depends on what you want to do; if you have a field of text boxes set up you could populate a datatable and do something like

txtBox1.Text = dt.Rows[0]["ItemName"];

of you could use a datagrid and do something like

DataGrid.DataSource = dt;
DataGrid.DataBind();

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve data from database and populate on PDF kotaiah Java Basics 1 February 13th, 2007 06:00 AM
retrieved data report problem rahmanbd Beginning VB 6 0 March 18th, 2005 08:52 AM
sorting retrieved data don baroo Classic ASP Basics 2 November 23rd, 2004 08:31 AM
have to hyperlink the data retrieved ractim ADO.NET 21 August 27th, 2004 09:34 AM
highlight results retrieved from database dhaywirex Classic ASP Basics 0 February 24th, 2004 04:06 AM





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