View Single Post
  #2 (permalink)  
Old July 30th, 2012, 10:55 AM
guenfire guenfire is offline
Authorized User
Points: 87, Level: 1
Points: 87, Level: 1 Points: 87, Level: 1 Points: 87, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2012
Location: New Mexico
Posts: 21
Thanks: 1
Thanked 2 Times in 2 Posts
Default

sophia,

A query is always performed on an Entity object or model, not really on the EntityDataSource. The easiest way to do what you're attempting is add a Where clause to the EntityDataSource similar to below and store the parameter specified in a Session object.

HTML Code:
<WhereParameters>
   <asp:SessionParameter Name="UserID" SessionField="UserID" />
</WhereParameters>
From there, in the Page_Load event of the code-behind, you might write something like this:

Code:
Session["UserID"] = [user_id_from_data_table]
Happy coding!
Reply With Quote