|
Hello, can anyone help with this? trying to display relevant products once you've selected from a Category link. Category links are on a seperate page - well a user control and are contained within a DataList. Have it set-up so once you select a category you arrive at Products.aspx and all products are displayed in a DataList but I carnt get it to just display the relevant products.
My C# for Master DataGrid:
private void Page_Load(object sender, System.EventArgs e)
{
sqlDataAdapter1.Fill( dataSet1 );
DataGrid1.DataSource = dataSet1;
DataGrid1.DataKeyField = "CategoryID";
DataGrid1.DataBind();
}
private void DataGrid1_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.SelectedIndex = e.Item.ItemIndex;
}
Im stuck with the detail.aspx C#, do it so it knows to display only the relevant products in a DataList. Any help would be greatly appreciated, Im new to this and my book isnt telling much.
|
|
|
What exactly is the problem? I mean, do you need help with Web Forms, .NET events, ADO.NET, or something else?
|
|
|
|
|
hi
if u r using datagrid then use hyperlink column or templete column with hyperlink and by clicking on it go to ur products.apsx page. now here hyperlink column u can specify,
URL : products.aspx
URL Fiels : id
URL Formatstring : products.aspx?id={0};
the url formatsting with id={0} will pick up the datakey field associated with ur current row of datagrid.
try ur luck.
Regards,
Manoj
|
|
|
|
|
|
|
|