Click here to Skip to main content
15,900,258 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow the Filter by tag feature on Code Project is done ? Pin
Pradeep_Nair28-Dec-09 14:33
Pradeep_Nair28-Dec-09 14:33 
QuestionImporting .cer into .pfx Pin
siva.lankada28-Dec-09 13:32
siva.lankada28-Dec-09 13:32 
QuestionTreeview indentation not proper for last node Pin
pranilrao28-Dec-09 11:02
pranilrao28-Dec-09 11:02 
AnswerRe: Treeview indentation not proper for last node Pin
pranilrao29-Dec-09 11:47
pranilrao29-Dec-09 11:47 
QuestionHow to write user control ? Pin
paper6728-Dec-09 5:56
paper6728-Dec-09 5:56 
QuestionUsing FaceBook in ASP Pin
Anil Kumar.Arvapalli28-Dec-09 3:36
Anil Kumar.Arvapalli28-Dec-09 3:36 
AnswerRe: Using FaceBook in ASP Pin
sashidhar28-Dec-09 6:13
sashidhar28-Dec-09 6:13 
QuestionDatabase searching Pin
sv_vasja28-Dec-09 1:17
sv_vasja28-Dec-09 1:17 
Hello,

I am trying to pass parametarst from one page to another(based on users search) and get results from the database accordingly.

Response.Redirect("~/TestPage.aspx?" + "Test1=" + Server.UrlEncode(comboTest1.Text) + "&Test2=" + Server.UrlEncode(comboTest2.Text));


The user can specify value in the one combo or in the both.

if (Request.QueryString["Test1"] != null || Request.QueryString["Test2"] != null)
{ SelectData(Request.QueryString["Test1"], Request.QueryString["Test2"]); }


DataClassesDataContext db = new DataClassesDataContext();
public IQueryable SelectData(string Test1Query, string Test2)
{
   IQueryable data = from t1 in db.Test1
                     join t2 in db.Test2on t1.ID equals t2.fkTest1 into Joined
                     from j in Joined.DefaultIfEmpty()
                     where t1.Manufacturer == Manufacturer || c.Model == Model )
                     select new { ID = t1.ID, Test1 = t1.Field1, Test2 = j.Field2 };
   return data;
 }


If the user select only (||) value for the one combo and not the other, the code is not working. How do i fix this? I want the users to be able to perform searches by selecting values from provided number of comboboxes by their own choice.

vasja
AnswerRe: Database searching Pin
ProtoBytes28-Dec-09 12:33
ProtoBytes28-Dec-09 12:33 
GeneralRe: Database searching Pin
sv_vasja28-Dec-09 21:19
sv_vasja28-Dec-09 21:19 
GeneralRe: Database searching [Null Values] Pin
ProtoBytes29-Dec-09 3:27
ProtoBytes29-Dec-09 3:27 
GeneralRe: Database searching [Null Values] Pin
sv_vasja29-Dec-09 21:35
sv_vasja29-Dec-09 21:35 
GeneralRe: Database searching [Null Values] Pin
ProtoBytes30-Dec-09 3:30
ProtoBytes30-Dec-09 3:30 
QuestionOnline Update Issue! Pin
Sr...Frank27-Dec-09 23:54
Sr...Frank27-Dec-09 23:54 
AnswerRe: Online Update Issue! Pin
Sr...Frank28-Dec-09 4:53
Sr...Frank28-Dec-09 4:53 
QuestionRow should be bold in SSRS Pin
siddisagar27-Dec-09 20:27
siddisagar27-Dec-09 20:27 
AnswerRe: Row should be bold in SSRS Pin
sashidhar27-Dec-09 21:27
sashidhar27-Dec-09 21:27 
GeneralRe: Row should be bold in SSRS Pin
siddisagar27-Dec-09 23:58
siddisagar27-Dec-09 23:58 
GeneralRe: Row should be bold in SSRS Pin
sashidhar28-Dec-09 0:13
sashidhar28-Dec-09 0:13 
QuestionHow to check cookies are enable or disable in borwser Pin
Samarjeet Singh@india27-Dec-09 20:12
Samarjeet Singh@india27-Dec-09 20:12 
AnswerRe: How to check cookies are enable or disable in borwser Pin
Abhishek Sur27-Dec-09 20:23
professionalAbhishek Sur27-Dec-09 20:23 
GeneralRe: How to check cookies are enable or disable in borwser Pin
Samarjeet Singh@india27-Dec-09 20:57
Samarjeet Singh@india27-Dec-09 20:57 
GeneralRe: How to check cookies are enable or disable in borwser Pin
Abhishek Sur27-Dec-09 21:32
professionalAbhishek Sur27-Dec-09 21:32 
GeneralRe: How to check cookies are enable or disable in borwser Pin
Samarjeet Singh@india27-Dec-09 22:02
Samarjeet Singh@india27-Dec-09 22:02 
GeneralRe: How to check cookies are enable or disable in borwser Pin
Abhishek Sur27-Dec-09 22:11
professionalAbhishek Sur27-Dec-09 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.