C# Class Sitecore.SharedSource.Commons.Utilities.WebControlUtil

Provides Utilities for dealing with Sitecore Webcontrols and Sublayouts
Show file Open project: Velir/Sitecore-Commons

Public Methods

Method Description
GetParameters ( WebControl control ) : NameValueCollection

Provides a NameValueCollection of Parameters listed in the Webcontrol and Sublayout Data Template. Takes the Parameter string Field and Separates it out as such. Title=Some Title Subtitle=Some SubTitle Something=Else Takes this, splits it out for each line, then adds to the collection. The above creates: {'Title'=>'Some Title','Subtitle'=>'Some SubTitle','Something'=>'Else'} This overload assumes that the Parameters are separated by line and the key/value pairs are delimited by an equal sign (=).

GetParameters ( WebControl control, char delimiters, char keyPairDelimiter ) : NameValueCollection

Provides a NameValueCollection of Parameters listed in the Webcontrol and Sublayout Data Template. Takes the Parameter string Field and Separates it out as such. Title=Some Title Subtitle=Some SubTitle Something=Else Takes this, splits it out for each line, then adds to the collection. The above creates: {'Title'=>'Some Title','Subtitle'=>'Some SubTitle','Something'=>'Else'}

Method Details

GetParameters() public static method

Provides a NameValueCollection of Parameters listed in the Webcontrol and Sublayout Data Template. Takes the Parameter string Field and Separates it out as such. Title=Some Title Subtitle=Some SubTitle Something=Else Takes this, splits it out for each line, then adds to the collection. The above creates: {'Title'=>'Some Title','Subtitle'=>'Some SubTitle','Something'=>'Else'} This overload assumes that the Parameters are separated by line and the key/value pairs are delimited by an equal sign (=).
public static GetParameters ( WebControl control ) : NameValueCollection
control WebControl The WebControl object, usually 'this' will work.
return System.Collections.Specialized.NameValueCollection

GetParameters() public static method

Provides a NameValueCollection of Parameters listed in the Webcontrol and Sublayout Data Template. Takes the Parameter string Field and Separates it out as such. Title=Some Title Subtitle=Some SubTitle Something=Else Takes this, splits it out for each line, then adds to the collection. The above creates: {'Title'=>'Some Title','Subtitle'=>'Some SubTitle','Something'=>'Else'}
public static GetParameters ( WebControl control, char delimiters, char keyPairDelimiter ) : NameValueCollection
control WebControl The WebControl object, usually 'this' will work.
delimiters char char[] of parameter delimiters
keyPairDelimiter char delimiter of key/value pair separator
return System.Collections.Specialized.NameValueCollection