Blog
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    API(s)
    Sencha-Touch
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
 

Home >> ASP.Net & Web Forms >> Encode - Decode in ASP.NET
Encode - Decode in ASP.NET

Encoding - Decoding in ASP.NET
Views: 1322     Comments: 0
by Uttam Misra on 12/22/2010

Encode and Decode in ASP.Net

 

Html Encode method encodes a particular string to be displayed in a browser. It is important to encode strings prior it’s rendering in the page, mainly to avoid cross-site script injection (XSS) and HTML injection attacks. However, developers so often forget to call the encode function.

Html Decode method decodes a particular string which is encoded.

Encoding and decoding is needed in somewhere like

·         Pass the values from one page to another.

·         Access the URL or pass the URL.

·         Fetch the data or insert data in Database.

·         Read the xml data or insert data in xml.

·         Change the special character from string

·         And security purpose etc.

 

In ASP.Net we used the following encode and decode method:

·         Server.HtmlEncode()

·         Server.HtmlDecode()

·         Server.HtmlUrlEncode()

·         Server.HtmlUrlDecode ()

·         HttpUtility.UrlEncode()

·         HttpUtility.UrlDecode ()

 

Check details here:

http://www.mindstick.com/Articles/b3d1fb4c-f386-49af-a464-fc96467eb957/?Encoding%20and%20Decoding%20in%20ASP%20Net

 

 

Title :  
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
       
 
Report Abuse Form
Reason:    
 
Latest ArticleRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest Blogs by Uttam MisraRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 7119
  
Copyright © 2009 - 2013MindStick. All Rights Reserved.