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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:33:05+00:00 2026-05-26T00:33:05+00:00

I maintain a moderate sized public internet website for a company built using C#

  • 0

I maintain a moderate sized public internet website for a company built using C# and ASP.Net WebForms using the .NET Framework 3.5. One of our 3rd-party marketing/lead generation consultants wants to reserve several query string codes that go into Google Analytics for themselves and have those codes persist as the user moves around the website. Since (for obvious reasons) I don’t really want to have to touch every place we generate an internal URL link to maintain these codes, is there anywhere in the ASP.NET page lifecycle where I could intercept these (either when they are being written when the page is served or after the link is clicked) so I do not have to change the links generated on dozens of pages and hundreds of individual instances.

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-26T00:33:05+00:00Added an answer on May 26, 2026 at 12:33 am

    If you’re on IIS 7, look into outbound rules using the IIS URL Rewrite module – http://learn.iis.net/page.aspx/657/creating-outbound-rules-for-url-rewrite-module/. They’re extremely powerful. You may be able to do this with older versions of IIS as well, but I’ve only worked with 7.

    Adding the following rules to your web.config will cause all query string values in the request URL to be appended to the URLs in the hrefs of every anchor tag in the response. The rules will apply to every page in your site.

    <rewrite>
      <outboundRules>
        <rule name="Add request query string when there is an existing query string" 
              patternSyntax="ECMAScript" stopProcessing="true">
          <match filterByTags="A" pattern="(.+)(\?)(.+)" />
          <conditions>
            <add input="{QUERY_STRING}" pattern=".+" />
          </conditions>
          <action type="Rewrite" value="{R:0}&amp;{C:0}" />
        </rule>
        <rule name="Add request query string when there is a ? but no query string data" 
              patternSyntax="ECMAScript" stopProcessing="true">
          <match filterByTags="A" pattern="(.+)(\?)$" />
          <conditions>
            <add input="{QUERY_STRING}" pattern=".+" />
          </conditions>
          <action type="Rewrite" value="{R:0}{C:0}" />
        </rule>
        <rule name="Add request query string when there is not an existing query string" 
              patternSyntax="ECMAScript" stopProcessing="true">
          <match filterByTags="A" pattern="(.+)(\?){0}" />
          <conditions>
            <add input="{QUERY_STRING}" pattern=".+" />
          </conditions>
          <action type="Rewrite" value="{R:0}?{C:0}" />
        </rule>
      </outboundRules>
    </rewrite>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I maintain a legacy ASP.Net Web application (using .Net 2.0 + SQL Server 2005
I maintain a legacy ASP.NET custom control component that implements a menu using CSS
I maintain an ASP.net 3.5 website for a client who is now wanting to
I maintain an ASP.NET MVC website that uses FormsAuthentication.SetAuthCookie(userName, createPersistentCookie); to sign users in
I maintain the build system at my company, which is currently using CVS. This
I maintain a small app which is built in VC++ 2008 (a .net app)
I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of
We maintain a medium sized windows application developed in vb/c# .net in work. Still
We maintain a website built on LAMP stack that allows members to log into
I maintain a website for the company I work for and just yesterday it

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.