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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:36:20+00:00 2026-05-12T09:36:20+00:00

I would line to add a test condition in an asp.net form such that:

  • 0

I would line to add a test condition in an asp.net form such that:

1) From page1.aspx I manually add a query string parameter so that I can trigger the rest of the process in test mode like so: page1.aspx?test=true . This flag must be added in the query string.
2) When I click on a asp.net button in page1.aspx, I am redirected to page2.aspx in test mode
because of teh attached querystring

It seems that I have to work around the postback model of asp.net this is not very straight forward.

Any idea how I can achieve the above behavior?

Thanks

  • 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-12T09:36:21+00:00Added an answer on May 12, 2026 at 9:36 am

    It sounds like you’re using a form that posts, but you want to stay in “test” mode. That is, you’re not using HTTP-GET so it’s not realistic to pass QS variables around.

    What I’d do is stash a variable in your Session to set the user’s session test mode. So adding &test=true would trigger a Session[“TestMode”] = true; before you move to the next page.

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

Sidebar

Related Questions

Is it good to add line-height in body{line-height:1.5} or it would be better if
I would like to add a custom context menu with line separators, but can't
I would like to add a data table to bottom of a (line) chart
I'm not sure how to test this question. I have an ASP.NET page for
What GNU/Linux command-line tool would I use for performing a search and replace on
Just curious how you would comment this line of code: string customerNm = customerNm.EndsWith(s)
If I had 1000 rows, would a single-line separator make the table view bigger
I would like to break a long line of text assigned to the standard
How would you store formatted blocks of text (line breaks, tabs, lists - etc.)
I would like to implement a command line interface for a Java application. This

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.