codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Master / Detail problem  crite at 05:06 on Sunday, November 21, 2004
 

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.

  Re: Master / Detail problem  tgreer at 23:27 on Sunday, November 21, 2004
 

What exactly is the problem? I mean, do you need help with Web Forms, .NET events, ADO.NET, or something else?



  Re: Master / Detail problem  t.manojp at 08:06 on Tuesday, November 23, 2004
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Re: ASP.NET web controls
•  Re: JavaSript Problem In Mac Safari Browser
•  Re: DHTML div positionning Problem
•  Convert script to NS6 compatible - Please Help!
•  Print .doc file from the website using System.Diagnostics.Process
•  Re: Fullscreen code
•  Re: iframe targeting
•  Excel n ASP


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005