Click here to Skip to main content
15,922,427 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have an asp.net framework page in C# that contains several text boxes and buttons.
Each of these buttons contains a CRUD operation.
The page also contains a drop-down list of items linked to the local database.
How can I make this list display a spreadsheet for the desired item

What I have tried:

I want to make the Items dropdown list display only the data table for that item
Posted

1 solution

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{

string selectedValue = DropDownList1.SelectedValue;
DisplayDataForSelectedItem(selectedValue);
}

private void DisplayDataForSelectedItem(string selectedItem)
{

GridView1.DataSource = GetDataForSelectedItem(selectedItem);
GridView1.DataBind();
}

private object GetDataForSelectedItem(string selectedItem)
{

return null;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900