Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8332819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:49:50+00:00 2026-06-09T02:49:50+00:00

Original String is: csrfToken=ajax:1238044988226892967&postTitle=Job Openings Linux Systems Administrator Staff&postText=Security Clearance: Public Trust — Linux

  • 0

Original String is:

    csrfToken=ajax:1238044988226892967&postTitle=Job Openings Linux Systems Administrator 
Staff&postText=Security Clearance: Public Trust -- Linux systems administration experience specifically in managing or supporting RedHat and/or Centos Linux in...&pollChoice1-
ANetPostForm=&pollChoice2-ANetPostForm=&pollChoice3-ANetPostForm=&pollChoice4-ANetPostForm=&pollChoice5-ANetPostForm=&pollEndDate-ANetPostForm=0&contentImageCount=1&contentImageIndex=0&
contentImage=http://www.ideal-jobs.net/images/image070.jpg&contentEntityID=5637974394992087135&contentUrl=http%3a%2f%2fwww.ideal-jobs.net%2fjob-openings-
linux-systems-administrator-staff%2f&contentTitle=Job Openings Linux Systems Administrator 
Staff&contentSummary=Security Clearance: Public Trust -- Linux systems administration experience specifically in managing or supporting RedHat and/or Centos Linux in...&contentImageIncluded=true&%23=Save&tweet=&postItem=Share&gid=50565&ajax=true&tetherAccountID=&facebookTetherID=

String i want it to be like after encoding:

 csrfToken=ajax%3A6293994705950333071&postTitle=hello&postText=Hi%20everyone%20hae%20a%20good%20day%20%2C%20i%20am%20new%20to%20this%20%3A)&
pollChoice1-ANetPostForm=&pollChoice2-ANetPostForm=&pollChoice3-ANetPostForm=&pollChoice4-
ANetPostForm=&pollChoice5-ANetPostForm=&pollEndDate-ANetPostForm=0&contentImageCount=0&contentImageIndex=-1&contentImage=&contentEntityID=&contentUrl=&contentTitle=&
contentSummary=&contentImageIncluded=true&%23=&gid=163857&postItem=&ajax=true&tetherAccountID=&facebookTetherID=

And currently i am using :

byte[] byteData = HttpUtility.UrlEncodeToBytes(postData);

and i am getting the string (i see in fiddler) like :

    csrfToken%3dajax%3a1238044988226892967%26postTitle%3dJob+Openings+Linux+Systems+Administrat
or+Staff%26postText%3dSecurity+Clearance%3a+Public+Trust+--+Linux+systems+administration+ex
perience+specifically+in+managing+or+supporting+RedHat+and%2for+Centos+Linux+in...%26pollCh
oice1-ANetPostForm%3d%26pollChoice2-ANetPostForm%3d%26pollChoice3-ANetPostForm
%3d%26pollChoice4-ANetPostForm%3d%26pollChoice5-ANetPostForm%3d%26pollEndDate-
ANetPostForm%3d0%26contentImageCount%3d1%26contentImageIndex%3d0%26contentImage%3dhttp
%3a%2f%2fwww.ideal-
jobs.net%2fimages%2fimage070.jpg%26contentEntityID%3d5637974394992087135%26contentUrl%3dhtt
p%253a%252f%252fwww.ideal-jobs.net%252fjob-openings-linux-systems-administrator-
staff%252f%26contentTitle%3dJob+Openings+Linux+Systems+Administrator+Staff%26contentSummary
%3dSecurity+Clearance%3a+Public+Trust+--+Linux+systems+administration+experience+specifical
ly+in+managing+or+supporting+RedHat+and%2for+Centos+Linux+in...%26contentImageIncluded%3dtr
ue%26%2523%3dSave%26tweet
%3d%26postItem%3dShare%26gid%3d50565%26ajax%3dtrue%26tetherAccountID
%3d%26facebookTetherID%3d

ALSO TRIED:

UTF8Encoding encoding = new UTF8Encoding();

AND

byte[] byteData = HttpUtility.UrlEncodeUnicodeToBytes(postData);

Still no luck..

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:49:53+00:00Added an answer on June 9, 2026 at 2:49 am

    The problem is you’re URL encoding the whole string, including the delimiter characters & and =. You first need to parse the string into fields, then url encode just the field names and values and finally recombine into a string.

    Give this a try:

    string input;      // Your input string
    List<string> outputs = new List<string>();
    
    // Parse the original string
    NameValueCollection parms = HttpUtility.ParseQueryString(input);
    
    // Loop over each item, url encoding
    foreach (string key in parms.AllKeys)  {
        foreach (string val in parms.GetValues(key))
            outputs.Add(HttpUtility.UrlEncode(key) + "=" + HttpUtility.UrlEncode(val));
    }
    
    // combine the encoded strings, joining with &
    string result = string.Join("&", outputs);    // the final result
    

    EDIT

    Here is a simpler version I figured out while trying out my previous idea:

    string result = HttpUtility.ParseQueryString(postData).ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the original string Apple iPad 2 16GB Wifi + 3G (AT&T) after
original string is a,d,k I want to remove all , and make it to
Original String: Lorem ##ipsum## dolar ##sit## atem. Lorem ipsum dolar sit ##atem##. After formating:
It seems to be a problem with magic quotes. The original string just contains
String product = Integer.toString(w); char[] original = String.toCharArray(product); This is the code I have
My original problem was how to map multidimensional int array to string.Following was the
Does the original data type of the username string in a call to FormsAuthentication.SetAuthCookie(...)
original column is like: 0.45::rafas::4.0::0.0::0.9 0.35::rasaf::4.0::110.0::1.0 and i would like to break the string
Sometimes i face the following problem : string txt = con.Request.Params[Par_name].ToString();//the original par value
Why does the original string remain unchanged in example 1 and the original instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.