The WebUtil Class in Sitecore

by aboo bolaky 30. November 2008 06:36

For those Sitecore lovers..

When you code against Sitecore, whether against renderings or sublayouts, I'd suggest you have a look at the very useful methods defined in Sitecore.Web.WebUtil Class. Those methods will help save you some time and prevent you from re-inventing the wheel. Some methods worth mentioning are :-

string AddQueryString(string url, params string[] parameters)
string AddQueryString(string url, bool xhtml, params string[] parameters)
string ExecuteWebPage(string url)
string ExtractFilePath(string url)
string ExtractUrlParm(string name, string url)
Placeholder FindPlaceholder(string key, Control root)
HtmlAnchor GetAnchor(Item itm, string linkField)
Control GetErrorControl(string error, string details)
Control GetFormControl(Page page)
string GetFormValue(string fieldName)
string GetFullUrl(string url, string serverUrl)
string GetHostIPAddress()
string GetHostName()
string GetQueryString()
string GetQueryStringOrCookie(string key, string defaultValue)
void RedirectToErrorPage(string text)
string RemoveQueryString(string url)
void ReloadPage()
string ReplaceUrlParameter(string url, string replace, string withtext, bool append)

Alternatively, you can have a peek at all the methods in the screen grab below [Click on the image for a better view..]


.Net | Applications | Sitecore | Tips & Tricks


11/5/2011 6:13:40 AM #


I was looking at several of your blog dispatchs on this internet point besides I realize this fabric point is rattling instructive! Preserve posting .

riad France |

11/7/2011 5:55:06 AM #

voir Marrakech

Truly stimulating stages you acquire celebrated , value it for posting . “Success is a travel, negative a end. The doing is frequent better eminent than the conclusion.” by Arthur Ashe.

voir Marrakech France |

11/13/2011 4:38:28 AM #

visite Marrakech

Deference to condition founder , several grand choosy material . “When you desist to ideal you desist to reside.” by Malcolm Stevenson Forbes.

visite Marrakech France |

11/15/2011 1:01:46 PM #

a6 immobilier maroc

I think that is with the most expressive info for me. Further i’m pleasing reading your column. Still wanna comment on quantity public circumstances, The website fashion is incredible, the columns is in proposition of actuality attractive Souriant . Conscientious franchise function, acclaims.

a6 immobilier maroc France |

Tag cloud

Flash Player 9 required.

About Me

I wish I could write something here..
//TODO: ElaborateMe