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 281833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:14:13+00:00 2026-05-12T05:14:13+00:00

Is there a way to url encode the entire URL querystring without trying to

  • 0

Is there a way to url encode the entire URL querystring without trying to urlencode each individual querystring parameters. Right now I’m having to rebuild the querystring with something like this:

foreach (string x in Page.Request.QueryString.Keys)
{
 sQueryString += x + "=" + Server.UrlEncode(Request.Params.Get(x)) + "&";
}
  • 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-05-12T05:14:14+00:00Added an answer on May 12, 2026 at 5:14 am

    All you should to do is to get the following value:

    Page.Request.Url.Query
    

    See:

        Uri baseUri = new Uri("http://www.contoso.com/catalog/shownew.htm?date=today&<a>=<b&gt;");
        string queryString = baseUri.Query;
    

    The queryString parameter will return ?date=today&%3Ca%3E=%3Cb%3E.

    One more edit - from the MSDN:

    The Query property contains any query
    information included in the URI. Query
    information is separated from the path
    information by a question mark (?) and
    continues to the end of the URI. The
    query information returned includes
    the leading question mark.

    The query information is escaped
    according to RFC 2396 by default. If
    International Resource Identifiers
    (IRIs) or Internationalized Domain
    Name (IDN) parsing is enabled, the
    query information is escaped according
    to RFC 3986 and RFC 3987.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to use http_build_query() without having it URL encode according to
Is there a way to get the server url (ex: http://www.myapp.com:8080/applicationFolder ) without having
Is there a way to encode a URL without encoding the forward slashes in
Is there a way in python to url encode list without variables names? for
I there a way to getting picture(image) from URL without downloading? I use the
Is there a way to retrieve the parameters in the URL inside your HTML
Given some arbitrary url: view.php?viewid=blahblahblah Is there a way I can encode a query
Is there a simple way to do URL encode in C? I'm using libcurl
Is there a built-in way to URL encode a string in Excel VBA or
Is there a way I can detect an image URL, like: http://mysite.com/image.jpg but with

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.