Page 1 of 1

Create NavigateUrl Function

Posted: Tue Jan 12, 2010 9:51 am
by bradtm
Is there a helper function to create the NavigateUrl for a Product without the Product object?

brad

Re: Create NavigateUrl Function

Posted: Tue Jan 12, 2010 10:16 am
by mazhar
You can make use of GetBrowseUrl method of CommerceBuilder.Catalog.UrlGenerator class. For example here is sample code

Code: Select all

int productId = 33;
string productName = "All-in-One Printer";
string relativeURL = UrlGenerator.GetBrowseUrl(productId, CatalogNodeType.Product, productName);

Re: Create NavigateUrl Function

Posted: Tue Jan 12, 2010 10:32 am
by bradtm
Perfect. Thanks!