|
| Use Search button on one page and display results in gridview on second page |
 |
Thu, 3 Apr 2008 21:48:54 +0000 |
Hello!
I am wanting to do a search button on website. I have a "Search
button" and a textbox where users will enter their information. After they
hit the search button, I would like for them to nagviate to the
"SearchResults.aspx" page where the results will be displayed in a
gridview. I will be ONLY searching on one table called "Requests"
where one of the columns is named "Summary"....i just need to search
within the summary column basically. How would I go about doing this? Your help
is very much appreciated! Thanks :-)
|
| Post Reply
|
| Re: Use Search button on one page and display results in gridview on second page |
 |
Thu, 3 Apr 2008 22:41:06 +0000 |
You can have just one page with your search criteria in a panel and when they
enter the search criteria just hide that panel and pass that criteria to your
gridview query statement and make your gridview visible.
|
| Post Reply
|
| Re: Use Search button on one page and display results in gridview on second page |
 |
Thu, 3 Apr 2008 23:06:26 +0000 |
ahlaj77,
Let me say that I am by far the least qualified in giving out advice, but it
just so happens that I just completed an app of my own which mirrors yours
almost exactly. Heck, even my page is named the same as yours:
"searchresults.aspx". I'm not sure what all you need help with, but
let me say this for starters.
Of course, you will need to capture the user-entered information and pass it to
the second page. Probably use Context.Items for this. That is, unless you prefer
doing it all within one page as karan suggested above. Upon passing to the
second page, you will then bind your query to the gridview. Do all of this in
the page-load event.
Hope I'm correct and this helps a little.
|
| Post Reply
|
| Re: Use Search button on one page and display results in gridview on second page |
 |
Thu, 3 Apr 2008 23:13:19 +0000 |
karan@dotnet:
You can have just one page with your search criteria in a panel and when they
enter the search criteria just hide that panel and pass that criteria to your
gridview query statement and make your gridview visible.
If I do decide to do this...after I do a search how can I make my search
results panel show up at the top of the page in place of my other panel that
simply displays all the information (in a gridview) when you first enter the
website. :-) Thanks!
|
| Post Reply
|
| Re: Use Search button on one page and display results in gridview on second page |
 |
Thu, 3 Apr 2008 23:15:08 +0000 |
well when you first enter your website in the page load.
SearchPanel.Visible = true.
Gridview.Visible = false;
and when they click search:
SearchPanel.Visible = false;
Gridview.Visible = true;
|
| Post Reply
|
|
|
|
|
|
|
|
|
|