What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 6992 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET > Query String Encoding ...
Dotnetrajanikanth

Query String Encoding

Replies: 4 | Posted by: Dotnetrajanikanth on 5/16/2012 | Category: ASP.NET Forums | Views: 1380 | Status: [Member] | Points: 10  


Dear Frnds,

I am facing problem in encoding query string.

My Code Is Like This

window.location = '../Blogging/Article.aspx?Article=' + encodeURI(postID);

This is a javascript code. I want to encode the query string. The methods encodeURI and encodeURIComponent are not working. Please provide a solution for that.

____________
www.flickr.com/photos/psdesigner/


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Somasundaram
Somasundaram  
Posted on: 5/16/2012 7:51:37 AM
Level: Starter | Status: [Member] | Points: 25


Use this while passing Query String:

Server.UrlEncode(PostID)


Dotnetrajanikanth, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/17/2012 12:41:52 AM
Level: Starter | Status: [Member] | Points: 25

hi

try this code,

Response.Redirect("default.aspx?data=" + HttpUtility.UrlEncode(value));


Regards
Kavi.n

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Dotnetrajanikanth
Dotnetrajanikanth  
Posted on: 5/17/2012 4:07:02 AM
Level: Starter | Status: [Member] | Points: 25

Actually i need encoding in javascript and decoding in VB.net code behind.

I got the solution for encoding.. but now i am not able to decode

____________
www.flickr.com/photos/psdesigner/

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/17/2012 4:19:13 AM
Level: Starter | Status: [Member] | Points: 25

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 4:49:17 PM