Results 1 to 6 of 6

Thread: Dont show variables passed using querystring???

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Unhappy

    Hello,

    When passing variables from one page to the next using querystring eg....
    "MembersCenter.asp?uid=123&pwd=mypassword" - the variables now show in the browsers titlebar.
    Is there a way to get it NOT to show there!!??

    I know this might not be the best way to send info like uid/pwd, but in the application I'm using
    it, it really does not have to be a major "secret". I would however like it NOT to display.

    Thanks all,
    T

  2. #2
    Guest

    Smile

    sorry, Wish I knew. I just wanted to post so I will get notified if this question gets answered. I have been
    Encrypting my query strings to get around this problem so far.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    2 ways. Use frames
    Or do a form POST method and use request.form instead
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    You could also encrypt the URL.

  5. #5
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281

    Thumbs up

    Hey Turfbult,

    This is a routine that I used. It's not my code - I think I acquired it from either a VBWorld post or 4guysfromRolla. Anyway, it does the trick.

    URLEncode function:

    Code:
    Public Function URLEncode(Tx As String) As String
    	Const ZERO_PERCENT   As String = "%0"
    	Const PERCENT        As String = "%"
        Dim strTemp         As String
        Dim strChar         As String
        Dim nTemp           As Integer
        Dim nAsciiVal       As Integer
        Dim Str             As String
        
        Str = Trim$(Tx)
        If Len(Str) = 0 Then Exit Function
        For nTemp = 1 To Len(Str)
            nAsciiVal = Asc(Mid(Str, nTemp, 1))
            If ((nAsciiVal < 123) And (nAsciiVal > 96)) Then
                strTemp = strTemp & Chr$(nAsciiVal)
            ElseIf ((nAsciiVal < 91) And (nAsciiVal > 64)) Then
                strTemp = strTemp & Chr$(nAsciiVal)
            ElseIf ((nAsciiVal < 58) And (nAsciiVal > 47)) Then
                strTemp = strTemp & Chr$(nAsciiVal)
            Else
                strChar = Trim$(Hex$(nAsciiVal))
                If nAsciiVal < 16 Then
                    strTemp = strTemp & ZERO_PERCENT & strChar
                Else
                    strTemp = strTemp & PERCENT & strChar
                End If
            End If
        Next
        URLEncode = strTemp
    End Function
    Good luck!

    CG

  6. #6
    Guest
    Just make sure you put that encryption code into a dll. If you plan to code it straight onto your ASP you will run into problems with converting data types. all vars in an asp are variant.


    "strTemp = strTemp & -->Chr$<--(nAsciiVal)"


    At least I have had probles with it. I havn't actually tried you code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width