Click here to Skip to main content
15,895,084 members
Articles / Web Development / HTML

Parse out controls from your html page.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
27 Oct 2011CPOL 6.1K  
You can simplify this by doing the following:/// /// Render/// /// protected override void Render(HtmlTextWriter writer){ if (Session[ExcelExport] != null && bool.Parse(Session[ExcelExport].ToString())) { ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
6 Nov 2011Kabwla.Phone
Tip - Never use type equality because that does not support derived classes:if (item.GetType() == typeof(Image)) //this is bad, mkay.Instead use the following which does support derived classes:if (item is Image)The Microsoft prefered pattern (when you actually need the cast object)...
Please Sign up or sign in to vote.
24 Oct 2011rj45 2 alternatives  
Parse out controls from your html page.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions