Wrox Programmer Forums
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 July 4th, 2003, 01:37 AM
Registered User
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to display dataset using textbox

I am making a page to do the database modification, however, i used some autopostback properties in the page, once the autopostback is executed, the data on the textbox are set to initial values, I have an idea, I want to do the SQL query in the Page_Init(), but How could I set the initial values in the textbox control. I've wrote the code to creat the dataset, but I just don't know how to display it in the textbox, I know that I can't use the datagrid, cause I have to use the textbox to finish the database modification.

Any ideas will be appreciated.

Thanks in advance.

Old July 4th, 2003, 07:37 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Why can't you use a DataGrid? The DataGrid is an ideal candidate for on-line editting.
You can set a row to editable, and then supply a template for the editable row. This will allow you to present textbox, dropdown etc so the user can supply new data.

Check out the following articles about the DataGrid:




Alternatively, you can use a Repeater control, add textboxes to the template, and then bind the DataSet to the Repeater.

If this is not what you're after, please be more specific about what you're trying to accomplish.



Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to databind a textbox to a dataset field aven ASP.NET 2.0 Basics 1 January 26th, 2006 11:39 PM
how to display value to textbox tllcll Javascript 1 October 27th, 2005 09:10 AM
dataset and textbox altafingar Classic ASP Databases 1 August 13th, 2004 04:27 PM
textbox dataset altafingar ASP.NET 1.0 and 1.1 Basics 3 August 12th, 2004 02:41 PM

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