View Single Post
  #8 (permalink)  
Old July 20th, 2007, 08:07 AM
u2clone u2clone is offline
Authorized User
Join Date: Jul 2007
Location: Cumming, Ga, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to u2clone

OK, getting closer. I have this so the when clicking the button I get the proper query string in the link. The issue is that for the variables it is acutally returning the following string:

?countryid=CountryID&stateid=StateID&priceid=Price ID

The CountryID, StateID, and PriceID are supposed to be numbers that are in the database that it should be pulling from. Here is the codebehind:

public partial class forms_formtest : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            Country_Select.DataSource = SqlDataSource1;
            Country_Select.DataTextField = "Country";
            Country_Select.DataValueField = "CountryID";


    protected void SearchTest(object sender, EventArgs e)
        string strNewPage;
        strNewPage = "~/luxlistings/default.aspx?countryid={0}&stateid={1}&priceid={2} ";
        strNewPage = string.Format(strNewPage, Country_Select.DataValueField, State_Select.DataValueField, Price_Select.DataValueField);


I only did the Country in the DataBind as a test and it did the same thing that the others did which are run by the dropdown list code as shown in the first post.

How do I get it to pull the actual CountryID et al numbers from the database? It is pulling the Country on the Search page, why not when I execute the command. This is the only issue that I think is left.

Help. .. :(

Reply With Quote