Last post Nov 03, 2005 10:23 AM by tabbykitty
Nov 03, 2005 10:23 AM|tabbykitty|LINK
I have created a ‘search’ page in dreamweaver with a set of databound dropdownlists in a panel.
I have added static text to the dropdown lists so that I have an “all” functionality for each one.
Then I have added another panel with the results from the database displayed in a repeater with dreamweaver paging ( the results and paging being invisible until postback).
The idea is that once the visitor clicks the search button (in the search panel) it causes a postback and the search panel is made invisible whilst the results panel is made visible.
All goes well until I click the next (or any) link in my paging.
I then get the search panel back and no results panel.
If I then select the same settings in the drop down lists I get the next set of records but I have to do this every time.
I have tried everything to make it work but I cant get rid of the panel with the search in it and I’m not sure that if I do, I will be able to page the results.
I have tried it all out without setting the visibility attribute of the panels and it seems that I still have to select the same settings in the drop down lists, click submit and then I get the next set of results.
The paging gets its parameters from the search results dataset. I have tried changing the parameters to the dropdownlists but with the same result.
I am probably doing something really dim but, can anyone tell me what’s going on and how to sort it out, I have spent 2 days on this and I’m pulling my hair out.
Any help would be greatly appreciated. Thanks in advance
Here is my (latest) code
Sub Page_PreRender(sender As Object, e As EventArgs)
If Not IsPostBack Then
ddlStarRating.DataSource = dssearchstarrating.DefaultView
ddlStarRating.Items.Insert(0, New System.Web.UI.WebControls.ListItem("All","%"))
ddlStarRating.SelectedIndex = 0
ddlCategory.DataSource = dssearchcategory.DefaultView
ddlCategory.Items.Insert(0, New System.Web.UI.WebControls.ListItem("All","%"))
ddlCategory.SelectedIndex = 0
ddlPriceCategory.DataSource = dssearchprice.DefaultView
ddlPriceCategory.Items.Insert(0, New System.Web.UI.WebControls.ListItem("All","%"))
ddlPriceCategory.SelectedIndex = 0
Sub Page_Load(s As Object, e As EventArgs)
If Not Page.IsPostBack Then
pnlresults.Visible = False
pnlsearch.Visible = True
pnlresults.Visible = True
pnlsearch.Visible = False
HeaderText.Text = "Search Results"