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

The Archive Base Latest Questions

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

I’m not quite sure how to explain this, but I need to be able

  • 0

I’m not quite sure how to explain this, but I need to be able to add a user’s code to the end of the url of each page they go to.

Let me walk you through this…..I am a user, go to my site and type in my user code – which is NOT a login. There is no password, in theory there will be a box or some type of control that will allow a user to enter their code in.

This control will then add that user’s code to the end of each URL for every page in the site and will also auto-populate all of the products in our database that are tied to that code.

The user is like a business or affiliate marketer. We need that code at the end of each URL that way when he sends his clients emails with links in them for purchasing, the client will click the link, and that marketer will get credit for the sale(s).

If this makes sense, will someone direct me to a helpful tutorial or explain how this works to me please? Thank you

I was told to use this code:

<ul id="p7menubar">
    <li><a href="<% =GetIB("http://products.pfgbest.com") %>">Home</a></li>
    <li><a href="#" class="trigger">Lookup</a>
        <ul>
        <li><a href="<% =GetIB("Default.aspx") %>">Product</a></li>
        <li><a href="<% =GetIB("/FeatureSearch.aspx") %>">Feature</a></li>
        <li><a href="<% =GetIB("/DescriptionSearch.aspx") %>">Description</a></li>
        </ul>
    </li><!--end trigger li-->
    <div id="ib">
    Enter your IB code here:
        <asp:TextBox ID="IBTextBox" runat="server"></asp:TextBox>
        <asp:Button ID="IBTextBoxButton" runat="server" Text="Submit" />
    </div>
    </ul><!--end p7menubar-->


Partial Class MasterPage
Inherits System.Web.UI.MasterPage
Private _IB As String
Public Property IB() As String
    Get
        Return _IB
    End Get
    Set(ByVal value As String)
        _IB = value
    End Set
End Property

Public Function GetIB(ByVal url As String) As String
    If (url.Contains("?")) Then
        Return "&IB=" & _IB
    Else
        Return url & "?IB=" & _IB
    End If
End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not (String.IsNullOrEmpty(Request.QueryString("IB"))) Then
        _IB = Request.QueryString("IB")
    End If
End Sub
End Class

UPDATE: With the help of @DJ Quimby and ASP.net 3.5 for Dummies, I am now using this code and it seems to be taking it whatever value I type into my textbox:

 Protected Sub IBTextBoxButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles IBTextBoxButton.Click
    Session("IB") = IBTextBox.Text
    Dim IB As Integer = Session("IB")
    Response.Redirect("IBDefault.aspx?Baccount=" + Session("IB"))
End Sub

UPDATE:

<a target="_blank" href="<%# eval("Data") %>?IB=(Session("IB"))"><%#Eval("Title")%></a>

The “IB” gets underlined and says it must be followed by an equal (=) sign and a value. Or if in quotation marks, they must match.

  • 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:27:02+00:00Added an answer on May 26, 2026 at 12:27 am

    Unless there are any private data concerns, it may be best to store the user’s code into session.

    You can add most any variable you want to the session by doing the following:
    Session(“userCode”) = “12”

    And retrieve it like this:
    ‘Dim userCode as Integer’
    ‘userCode = Session(“userCode”)’

    Just make sure that the type you store it as is compatible with the type you assign it to when you pull it back down.

    To check on each page you could declare a private variable within the page to store the value:
    Private userCode As Integer

    And then
    Sub Page_Load(sender As Object, e As EventArgs)
    userCode = Session("userCode")
    End Sub

    Then just execute whatever other code you need to using that value.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need a function that will clean a strings' special characters. I do NOT
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.