Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 27th, 2011, 01:30 PM
Authorized User
 
Join Date: Jun 2011
Posts: 32
Thanks: 22
Thanked 0 Times in 0 Posts
Default From a dropdown list

Hi:

Wonder if you could give me some direction with the following:

Within a DetailsView

Based upon a dropdown list selected value by the user (which is a field in a table) I want to populate a TextBox with another field value that is in the same record.

My code behind is in C#

With regards,

Cliff
 
Old July 27th, 2011, 02:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I guess it depends on the circumstances. If you have the field available already, you could do it with pure JavaScript. Alternatively, you could hook up a Web Service and execute it with jQuery to get the related data. Personally, once you go down this route, I would drop the DetailsView and hand-code the form instead.

Can you please post questions not directly related to the book in a more general ASP.NET category: http://p2p.wrox.com/asp-net-4-539/ ? That way, you'll attract more viewers, while this category stays easy to use for readers of the book.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
esherr01 (July 27th, 2011)
 
Old July 27th, 2011, 02:30 PM
Authorized User
 
Join Date: Jun 2011
Posts: 32
Thanks: 22
Thanked 0 Times in 0 Posts
Default Sorry

I have done so, with the code I have.

Thanks

Cliff





Similar Threads
Thread Thread Starter Forum Replies Last Post
using dropdown list sophia BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 October 31st, 2009 02:46 PM
Dropdown list maha .NET Framework 2.0 7 April 28th, 2007 12:32 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
HELP WITH DROPDOWN LIST enavas Excel VBA 1 April 6th, 2004 02:08 PM





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