Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 October 31st, 2009, 10:22 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile using dropdown list

Hello Sir, thank you for replies on form view. I am working on it.
But I have one another query that I wanna use dropdown list instead of repeater. I have used dropdown list and bound it to the objectdata source like
Code:
<asp:DropDownList ID="lstCategoryId" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource1"
 DataTextField="Description" DataValueField="Id" AppendDataBoundItems="True">
  <asp:ListItem Value="">Please Choose Category</asp:ListItem>
  </asp:DropDownList>
And I wanna bound it with datalist control, so that whenever I choose any category from dropdown list then only corresponding items of particular items are filled in data list.
Any suggestion is most appreciated......
Or is there any other control where I can use dropdown list with other control providing same functionality as with datalist.
Thank you......

Last edited by sophia; October 31st, 2009 at 10:24 AM..
 
Old October 31st, 2009, 10:45 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You need to add a ControlParameter that points to the DropDownList in the <SelectParameters> element of the DataSource (like an ObjectDataSource control). This way, the data source can be filtered to only select records belonging to the item selected in the DropDownList.

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!
 
Old October 31st, 2009, 01:05 PM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

while I was waiting for reply I made a google search on the relevant topic, and found a very interesting result on the topic. I think it was worth watching.
And I made one more change in code behind file that was removing of LoadData method .It may help other visitors of the forum.
I think until we have query, we can't move much further that's why I keep asking questions and you of course help us out, so kind of you are.
And no doubt you helped me out and give a heartiest thank to you
Thank you sir.
Yeah still I am struggling with updating items in form view. Please help me in this regard. I find myself helpless in this matter. This seems to be going beyond my limit.

Last edited by sophia; October 31st, 2009 at 03:04 PM..
 
Old October 31st, 2009, 01:23 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 haven't read it so I don't know if I like it or not.

With regards to the FormView: I am afraid I can't help you much more. You need to study on this yourself using books and on-line resources. People on the Wrox forum can help you if you ask specific questions; they can't teach you how to program.....

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!
 
Old October 31st, 2009, 02:46 PM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

ok, thank you once again. I will try in new direction. Hope this time I'll be completing this. Thank you once again





Similar Threads
Thread Thread Starter Forum Replies Last Post
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.