Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:16:54+00:00 2026-05-11T14:16:54+00:00

(ASP.net 3.5, C#, SQL Express 2008) I want to have a Web Form, where

  • 0

(ASP.net 3.5, C#, SQL Express 2008)

I want to have a Web Form, where I can search for ‘Solutions’ (my table) using a keyword entered by the user and after the result comes back and populates a GridView.

I already have parts of this search via a stored procedure that is hooked up to my Entity Data Model. On this page I have an EntityDataSource. How can I make this EntityDataSource grab data from my stored procedure?

I realize I could just fetch the result via the Entity context (which works), and bind it to the grid, but if I don’t hook it up to the EntityDataSource I won’t get automatic paging and sorting (which has been another struggle of mine in the past)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:16:55+00:00Added an answer on May 11, 2026 at 2:16 pm

    Try using the Function Import.

    1. Right click on the EntitySet Name (the heading part)
    2. Choose Add->Function Import

    Here is a good blog post for you to check out. ADO.NET Entity Framework Tools: Stored Procedures, by Guy Burstein

    Update: Sorry I missed the part about the EntityDataSource so I don’t know of any property exposed to access a function import from the EDS, but your can try to use the CommandText property.

    <asp:EntityDataSource ID='SolutionsDataSource' runat='server'      CommandText='DataModel.SearchFunction(@Keywords)'     ConnectionString='name=AdventureWorksEntities'>     <CommandParameters>         <asp:ControlParameter Name='Keywords'              ControlID='SearchTextbox' Type='String'/>     </CommandParameters> </asp:EntityDataSource> 

    Update: Well it seems that I have some bad news. After using Reflector to dive deep into the EntityDataSource. The EntityDataSourceView is constructed using QueryBuilderUtils.ConstructQuery, which then in turn calls context.CreateQuery<T>. What you would need to execute the function import is a call to context.ExecuteFunction<T>. There doesn’t seem to be any support for the ExecuteFunction in this release, the blogs I was reading did mention that it was planned, but it didn’t make it into this release, whether or not it will be in future releases I can’t say.

    That being said I would recommend using an ObjectDataSource, which you can construct in a way that still supports paging, sorting, etc. If you open an ObjectDataSource question on this topic send me a comment here and I’ll take a look.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a wonderful ASP.NET MVC 2 web application using MS SQL 2008 and
I have created an Asp.net website using VS 2008 and SQL Express 2008 on
I've started building a ASP net MVC 2.0 web application using SQL Express 2008
I have a Web Role that is using the ASP.NET SQL Membership provider. Currently
I am developing a C#/SQL ASP.NET web application in VS 2008. I want the
I have the following installed: VS 2008 SP 1 ASP.NET MVC 1.0 SQL Express
So I have few ASP.NET apps all running off SQL Server Express 2008 and
We have a product that runs Sql Server Express 2005 and uses mainly ASP.NET.
I'm using the ASP.NET SQL Membership Provider. So, there's an aspnet_Users table that has
I'm using C# ASP.NET 4 and SQL Server 2008 R2 I'm getting an object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.