Page 1 of 1

Catalog Node Type enum

Posted: Fri Jan 23, 2009 8:53 am
by jmestep
I have to do certain things on the Admin catalog browse page, based on what kind of a catalog node type the link is and I need to have this refer to a table with the catalog node type as an integer.
public enum CatalogNodeType
{
Category = 0,
Product = 1,
Webpage = 2,
Link = 3,
}

I've looked up how to parse an enum some, but haven't got that figured out. I need to get the integer value for the enum (like 1) and use it as a parameter to load something else.
How do I get that value?
Like here - getting the integer of a CatalogNodeType
protected void DoDelete(CatalogNodeType catalogNodeType, int catalogNodeId)
Thanks

Re: Catalog Node Type enum

Posted: Fri Jan 23, 2009 9:05 am
by mazhar
try as below

Code: Select all

(short)CatalogNodeType.Product

Re: Catalog Node Type enum

Posted: Fri Jan 23, 2009 1:25 pm
by jmestep
This worked. Thanks!