URL Encode and Decode Demo (VB.net) : URL Encode Decode « Server « ASP.Net

ASP.Net
1. ADO.net Database
2. Asp Control
3. Collections
4. Components
5. Data Binding
6. Development
7. HTML Control
8. Mobile Control
9. Page
10. Request
11. Response
12. Server
13. Session Cookie
14. User Control and Master Page
15. Validation by Control
16. Validation by Function
17. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
ASP.Net » Server » URL Encode Decode 
URL Encode and Decode Demo (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub SubmitHTMLEncode_Click(Sender As Object, E As EventArgs)
    Dim MySU as HTTPServerUtility
    MySU = Server
    lblMessage1.Text = "Encoded: " _
        & MySU.HTMLEnCode(txtHTMLEncode.Text"<BR>" _
        "Enter HTML text to encode"
End Sub
Sub SubmitHTMLDecode_Click(Sender As Object, E As EventArgs)
    Dim MySU as HTTPServerUtility
    MySU = Server
    lblMessage2.Text = "Decoded: " _
        & MySU.HTMLDeCode(txtHTMLDecode.Text"<BR>" _
        "Enter HTML text to decode"
End Sub
Sub SubmitURLEncode_Click(Sender As Object, E As EventArgs)
    Dim MySU as HTTPServerUtility
    MySU = Server
    lblMessage3.Text = "Encoded: " _
        & MySU.URLEnCode(txtURLEncode.Text"<BR>" _
        "Enter URL text to encode"
End Sub
Sub SubmitURLDecode_Click(Sender As Object, E As EventArgs)
    Dim MySU as HTTPServerUtility
    MySU = Server
    lblMessage4.Text = "Decoded: " _
        & MySU.URLDeCode(txtURLDecode.Text"<BR>" _
        "Enter URL text to decode"
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Encoding and DeCoding Sample Page</TITLE>
</HEAD>
<BODY TEXT="black" LINK="darkred" VLINK="darkred" ALINK="red" LEFTMARGIN="40" TOPMARGIN="40">
<form runat="server">
<Font Face="Tahoma">
<asp:Label
    id="lblMessage1"
    runat="server"
    Text="Enter HTML text to encode"
    Font-Bold="True"
/>
<asp:TextBox
    id="txtHTMLEncode"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butEncode"
    runat="server"
    text="Encode"
    Type="Submit"
    OnClick="SubmitHTMLEncode_Click" 
/>
<BR><BR>
<asp:Label
    id="lblMessage2"
    runat="server"
    Text="Enter HTML text to decode"
    Font-Bold="True"
/>
<asp:TextBox
    id="txtHTMLDecode"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butDecode"
    runat="server"
    text="Decode"
    Type="Submit"
    OnClick="SubmitHTMLDecode_Click" 
/>
<BR><BR>
<asp:Label
    id="lblMessage3"
    runat="server"
    Text="Enter URL text to encode"
    Font-Bold="True"
/>
<asp:TextBox
    id="txtURLEncode"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butEncode2"
    runat="server"
    text="Encode"
    Type="Submit"
    OnClick="SubmitURLEncode_Click" 
/>
<BR><BR>
<asp:Label
    id="lblMessage4"
    runat="server"
    Text="Enter URL text to decode"
    Font-Bold="True"
/>
<asp:TextBox
    id="txtURLDecode"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butDecode2"
    runat="server"
    text="Decode"
    Type="Submit"
    OnClick="SubmitURLDecode_Click" 
/>
</Font>
</Form>
</BODY>
</HTML>
           
       
Related examples in the same category
1. Decoding Encoded HTML Strings (VB.net)
2. Encoding URL Strings (VB.net)
3. Encoding URL Strings in VB.net
4. Encoding URL Strings in C#
5. Encoding HTML Strings (VB.net)
6. Server.HtmlEncode (VB.net)
w___w__w.___j__a___v___a_2__s.co___m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.