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 December 2nd, 2011, 12:55 AM
Authorized User
 
Join Date: Jan 2011
Posts: 41
Thanks: 0
Thanked 1 Time in 1 Post
Default LINQ to EF eqiuvalent for SQL LIKE

Hi,

I am trying to implement a search engine on my site where my users can search for products and titles of books. When a user enters a keyword, he is directed like this;

Response.Redirect(string.Format("~/Results.aspx?Keyword={0}", searchTextBox.Text);

Then in the Load Event of the Results.aspx page, I want to collect the keyword and put it in a linq to EF query that returns values that are like the keyword, not exactly the keyword.
 
Old December 3rd, 2011, 01:59 PM
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,

For questions not directly related to the book such as this one, you're better off posting this in a more general ASP.NET category. This way you'll attract more viewers.

That said, what exactly do you need help with? You could use Contains on a string property to search text columns....

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 December 13th, 2011, 05:42 AM
Authorized User
 
Join Date: Jan 2011
Posts: 41
Thanks: 0
Thanked 1 Time in 1 Post
Default Thanks

That is what I do, but I thought there was another way.

Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ or T-SQL? DennisE ASP.NET 4 General Discussion 2 October 29th, 2011 11:36 AM
LINQ to EF and LINQ to SQL sophia BOOK: Beginning ASP.NET 4 : in C# and VB 1 October 19th, 2011 12:16 PM
Generic Question and EF vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 4 May 19th, 2011 04:14 PM
LINQ to SQL or not? gvdamn BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 2 August 20th, 2009 05:08 AM
LINQ to SQL bakm04 BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 0 August 17th, 2009 04:07 PM





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