Thank Shubham for having a look....
if (categoryId != null)
{
// Retrieve list of products in a category
list.DataSource =
CatalogAccess.GetProductsInCategory(categoryId, page, out howManyPages);
list.DataBind();
// get first page url and pager format
firstPageUrl = Link.ToCategory(departmentId, categoryId, "1");
pagerFormat = Link.ToCategory(departmentId, categoryId, "{0}");
}
and called function is :-
public static string ToCategory(string departmentId, string categoryId, string page)
{
if (page == "1")
return BuildAbsolute(String.Format("Catalog.aspx?DepartmentID={0}&CategoryID={1}", departmentId, categoryId));
else
return BuildAbsolute(String.Format("Catalog.aspx?DepartmentID={0}&CategoryID={1}&Page={2}", departmentId, categoryId, page));
}
public static string ToCategory(string departmentId, string categoryId)
{
return ToCategory(departmentId, categoryId, "1");
}
Nerdanalysis, if this helps please login to Mark As Answer. | Alert Moderator