Knowledge Base Category: Development

How to encode html to replace special characters

A simple function that will replace all your html tags into character code great for storing HTML in XML tags:  

VB Code

Public Function encoder(htmlcode As String) As String 
Dim writer As New IO.StringWriter 
Server.HtmlEncode(htmlcode, writer) 
Dim result As String = writer.ToString 
Return result 
End Function

C# Code

Read more

How to clear a form

To clear a web form full of textboxes and form controls just enclose all the objects in a Panel control then on your code behind use the following line


Read more
Page 12 of 12« First...89101112