Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 Basics 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 28th, 2007, 10:15 PM
Authorized User
 
Join Date: Aug 2007
Location: , , Singapore.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default No DetailsView display on adding FilterExpression

Hi

I have a problem here. I have a DetailsView control, DropDownList control, and 2 AccessDataSource controls named AcDsrcDDL & AcDsrcDV for accessing by DropDownList & DetailsView respectively.
I want to make it work like, I choose the number in the DropDownList(tied to AcDsrcDDL), AcDsrcDV will then get the value(eg: 1190), then filter the database to get the data for allocatedID = 1190 only. However, after I added the codes(in bold), my DetailsView never got displayed at all already.
How can I solve this problem? Thank you!

<asp:AccessDataSource ID="AcDsrcDDL" runat="server" DataFile="~/App_Data/DB.mdb"
 SelectCommand="SELECT [allocatedID] FROM [table] ORDER BY [allocatedID]">
</asp:AccessDataSource>

<asp:AccessDataSource ID="AcDsrcDV" runat="server" DataFile="~/App_Data/DB.mdb"
 SelectCommand="SELECT * FROM [table] ORDER BY [allocatedID]"
 FilterExpression="allocatedID='{0}'">
 <FilterParameters>
   <asp:ControlParameter Name="allocatedID" ControlID="DropDownList1"
    PropertyName="SelectedValue" />
</FilterParameters>

</asp:AccessDataSource>

<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
 BackColor="LightBlue" Font-Names="Arial Narrow" Height="238px" Style="z-index: 101;
 left: 537px; position: absolute; top: 53px" Width="243px" DataSourceID="AcDsrcDV">
</asp:DetailsView>

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
 DataSourceID="AcDsrcDDL" DataTextField="allocatedID" DataValueField="allocatedID"
 Style="z-index: 104; left: 344px; position: absolute; top: 5px">
</asp:DropDownList>
Reply With Quote
Reply


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
Dates in FilterExpression of Sqldsource mallikalapati ASP.NET 2.0 Professional 0 March 31st, 2008 11:11 PM
FilterExpression multiple parameters/placeholders NigelBronson ASP.NET 2.0 Basics 0 September 27th, 2006 04:57 PM
DetailsView faithfulman ASP.NET 2.0 Basics 1 September 22nd, 2006 11:16 PM
detailsview pau5160 ASP.NET 2.0 Basics 0 August 21st, 2006 10:47 PM



All times are GMT -4. The time now is 03:16 AM.


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