C# Class PetShop.Controls.WebUtility

Collection of utility methods for web tier
显示文件 Open project: netTiers/netTiers

Public Methods

Method Description
CleanNonWord ( string text ) : string

Method to check whether input has other characters than numbers

GetCategoryName ( string categoryId ) : string

Method to retrieve and cache category name by its ID

GetProductName ( string productId ) : string

Method to retrieve and cache product name by its ID

InputText ( string text, int maxLength ) : string

Method to make sure that user's inputs are not malicious

SearchRedirect ( string key ) : void

Method to redirect user to search page

Method Details

CleanNonWord() public static method

Method to check whether input has other characters than numbers
public static CleanNonWord ( string text ) : string
text string
return string

GetCategoryName() public static method

Method to retrieve and cache category name by its ID
public static GetCategoryName ( string categoryId ) : string
categoryId string Category id
return string

GetProductName() public static method

Method to retrieve and cache product name by its ID
public static GetProductName ( string productId ) : string
productId string Product id
return string

InputText() public static method

Method to make sure that user's inputs are not malicious
public static InputText ( string text, int maxLength ) : string
text string User's Input
maxLength int Maximum length of input
return string

SearchRedirect() public static method

Method to redirect user to search page
public static SearchRedirect ( string key ) : void
key string Search keyword
return void