How do I add a value to URL?

Posted on 2009-04-22
Last Modified: 2012-05-06
This has to be simple, but I can't get it to work.

I have a page that I need to add the startDate and endDate text fields to the URL when the submit button is pressed.


Without a redirect, I need it done via postback.

I want the submit button to postback to the page, and put the values in the URL.

Any ideas?
Question by:Meps
    LVL 14

    Expert Comment

    QueryString is a readonly property collection. If you want to do it without postback then you have to use


    in your code to have the form value persistent along with the query string during button click.
    LVL 3

    Author Comment

    That's the problem, this is part of a big form.

    If I do any sort of transfer or redirect, it will erase all the values in the form.

    Which is why I just wanted it to postback.
    LVL 3

    Accepted Solution

    I found this wasn't possible, every time you change the querystring, APS.Net sees it as a new page and changes viewstate and changes postback.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now