coding old hat but ASP Newbie

Results 1 to 2 of 2

Thread: coding old hat but ASP Newbie

  1. #1
    Join Date
    Dec 1969

    Default coding old hat but ASP Newbie

    I want to write some asp pages that will do this (acctual code is embedded):<BR><BR>When the person goes to a URL two variables get set up<BR>AccessLevel = 3 &#039;The access level needed to view this page<BR>URL = "http://something" &#039;The url of the page the person requested<BR><BR>Then this code gets executed<BR> CurAccessLevel = Request.Cookies("mfal")<BR> If CurAccessLevel &#060; AccessLevel Or CurAccessLevel = "" Then<BR> Response.Cookies("mfnal") = AccessLevel<BR> Response.Cookies("mfurl") = URL<BR> Response.Redirect("")<BR> End If<BR><BR>here is the problem.<BR>When the cookie is not set it works just fine, redirects me to the log in page.<BR>As soon as the cookie is set, no matter what the value is, it lets me into the asp page.<BR>The only thing I can think that it might be is that one could be a string and the other an integer but I don&#039;t know how to test for or correct that either.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Put some debugging code in..

    .. and do Response.Write&#039;s of the values. It might become apparent what the problem is.<BR><BR>But to do type casting, you would use:<BR>CStr() to convert to a string.<BR>CInt() to convert to an integer<BR>CLng() to convert to a long<BR>CDbl() to convert to a double

Posting Permissions

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