Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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
  #1 (permalink)  
Old March 17th, 2007, 12:11 PM
GS GS is offline
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating table from dropdown list

New to Using ASP .net 2.0

Hi all,

I have a grid view with a dropdown list.

When configuring the datasource for the GridView, I am using the wizard to create an update statement.

Trying to use the query builder how would I be able to do the following:

My dropdownlist is populated using a lookup table (TABLE2)
TABLE2 contains ID and description (description is what is populated in the dropdown).

TABLE1 contains the ID from TABLE1

I want to update and ID in TABLE1 taking the dropdown value.

Sorry if this sounds stupid !
  #2 (permalink)  
Old March 17th, 2007, 06:25 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JoinTTT
Default

Which one is primary key? table1 or table2?

do All data you populated comes from table1? except for table2.
I didn't understand what you want to do. Because you say 'TABLE1 contains the ID from TABLE1'. Is the dropdownlist in gridview as template column?
Please be clear.

But I think you have to write a query with joins two table?

  #3 (permalink)  
Old March 18th, 2007, 07:22 AM
GS GS is offline
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Apologies for being vague.

I have resolved this now as I didn't realise when configuring the datasource I can actually get the wizard to generate insert and update statements. This seems to have worked.


Similar Threads
Thread Thread Starter Forum Replies Last Post
updating the table from the list view columns Yasho VB Databases Basics 2 July 31st, 2007 02:06 AM
Updating a table from a dropdown GS ASP.NET 2.0 Basics 2 March 18th, 2007 07:22 AM
Updating a textbox from DropDown selection kjord ASP.NET 1.0 and 1.1 Professional 4 November 7th, 2006 04:04 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM





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