954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to proceed further ????

i have 3 tables Category, CityMaster and Data
Next, i Have 2 comboboxes For City and Category.


In my Category Table i have Two columns Category and Category ID which is unique for each Category.

In my CityMaster table i have 2 columns CityName and CityID wherein each CityName has a corresponding CITYID eg
Mumbai 1 etc...

In my Data datable i have 4 columns
Name , Address CITYID and CATEGORY ID .

IN my city Combobox all the Name of the cities should be listed.

When the user selects a particular CITY its corresponding category should be listed IN THE ANOTHER COMBOBOX named Category.

Till now i have done :

protected void Page_Load(object sender, EventArgs e)
    {
        SqlDataReader dr = null;
        SqlCommand command = new SqlCommand("Select City_Name from City_Master",conn);
        conn.Open();
        dr = command.ExecuteReader(CommandBehavior.CloseConnection);
        ddlcity.DataSource = dr;
        ddlcity.DataTextField = "City_Name";
        ddlcity.DataValueField = "City_Name";
        ddlcity.DataBind();
    }
}


PLZ TELL ME HOW TO PROCEED FURTHER ??

CYA
ROHAN

laghaterohan
Junior Poster
170 posts since Aug 2008
Reputation Points: 10
Solved Threads: 2
 

hi Rohan,
You have to include one more field in your citymaster table i.e., categoryid which is a foreignkey between category and citymaster tables.

Let me know if u want further ???

kameswari
Junior Poster in Training
76 posts since Sep 2008
Reputation Points: 13
Solved Threads: 16
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You