Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 1st, 2007, 09:29 AM
Friend of Wrox
Points: 630, Level: 9
Points: 630, Level: 9 Points: 630, Level: 9 Points: 630, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Austin, TX, USA.
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default How to dump TextBox values to a database

Where can I find from this book the information on
how to dump the TextBox values to a database?

TIA,
Jeffrey
__________________
C. Jeffrey Wang
  #2 (permalink)  
Old July 1st, 2007, 09:50 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

In the standard version of the book there are two chapters devoted to this: Data Binding in ASP.NET 2.0 and Data Management in ADO.NET.

I assume the Special Edition has the same or similar chapters.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old July 2nd, 2007, 01:57 PM
Friend of Wrox
Points: 630, Level: 9
Points: 630, Level: 9 Points: 630, Level: 9 Points: 630, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Austin, TX, USA.
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks.

I reviewed these two chapters quickly again. If I understand correctly, the initial aspx pages in these two chpaters are based on the database schema, e.g. GridView, then the users edit or update the database directly. I am wondering if I can prepare a web page with some text boxes for end users, who know nothing about the database, to provide their desired information only, then the submitted aspx file can update/insert these online data to the database.

TIA,
Jeffrey
  #4 (permalink)  
Old July 2nd, 2007, 02:03 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:who know nothing about the database
How do you see this?

Are you talking about dynamic SQL that adapts to what users enter? Or do you as a page developer know the schema?

The Data Management with ADO.NET chapter shows how to manually write code to update a database using objects like the SqlConnection, SqlCommand and parameters.

If this isn't what you're after, can you please elaborate?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #5 (permalink)  
Old July 3rd, 2007, 11:19 AM
Friend of Wrox
Points: 630, Level: 9
Points: 630, Level: 9 Points: 630, Level: 9 Points: 630, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Austin, TX, USA.
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, let me elaborate my question.

As an example, I have 4 tables: Voucher, Vendor, Request, and Received, and I want to prepare a web page with some 20+ textboxes
and labels. After the users fill the textboxes and click submit
button, I'd like the aspx page populate the users' textboxes values to my 4 tables, respectively.

Instead of using GridView, DetailsView, etc. of VS 2005 to display each table to a user, is there a new server control or format tool to link a textbox value to a specific database table. I know in VS 2003, we can write codes-behind to populate the tables. My question is: in VS 2005 we need the same coding, or ASP.NET 2.0 has a better tool to accomplish these tasks quickly for users who know nothing about the database tables?

TIA,
Jeffrey
  #6 (permalink)  
Old July 3rd, 2007, 01:27 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Users usually don't know about the database structure. The GridView and other databound controls and any home grown solutions (should) all shield the user from technical details.

If the GridView, DetailsView etc don't fit your solution, I think you need to write your own code using the objects I mentioned earlier.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #7 (permalink)  
Old July 3rd, 2007, 10:10 PM
Friend of Wrox
Points: 630, Level: 9
Points: 630, Level: 9 Points: 630, Level: 9 Points: 630, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Austin, TX, USA.
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks.

One more question. If I create some database Views, I should be able to use GridView, DetailsView, etc. to dump user's data to the Views.
Am I right?

TIA,
Jeffrey
  #8 (permalink)  
Old July 4th, 2007, 12:43 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

It depends. Some views are updateable, others aren't. This depends on the underlying queries of the views.

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 16, P. 619: Dump the values into a database cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 July 1st, 2007 09:26 AM
Sum Textbox Values Snuffles ASP.NET 2.0 Basics 1 April 13th, 2007 01:36 PM
Taking values from textbox derekl ASP.NET 1.0 and 1.1 Professional 3 February 20th, 2006 08:30 AM
concatinating values in textbox crmpicco Javascript How-To 1 July 1st, 2005 09:29 AM
textbox with numerical values must C# 1 August 7th, 2003 12:44 PM



All times are GMT -4. The time now is 03:52 PM.


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