URLEncode a Website Link

For a website URL which contains characters which will be interpreted incorrectly by browsers this needs to be escaped. URLEncode is used to protect the URL, for example for use in XML, or passing parameters within a querystring. System.Web.HttpUtility.UrlEncode(link) I have found the error object reference not set to an instance of an object. To […]

Read More… from URLEncode a Website Link

Formatting Datagrid Data Text Two Ways

Data grid output can be formatted differently for the public/normal view and the edit view. In this example both methods are used. Using inline table row editing with a DataGrid I wished to change the formatting according to its state. To illustrate this I have included below an example template column. <HEADERSTYLE HorizontalAlign=”Center”></HEADERSTYLE> <ITEMTEMPLATE> <asp:Label […]

Read More… from Formatting Datagrid Data Text Two Ways