|
|
|
|
|
| | |
| |
Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
|
|
Subject: |
Comparing numbers.... |
|
From: |
Ben Thompson |
|
Date: |
10/12/2000 7:23:48 AM |
|
IP: |
212.250.119.70 |
Ok, a funny one here...
In a forum I wrote I wanted to display an edit link if the current user was viewing a message they wrote.
I have already setup a session variable for the user - session("userid") - and also had the authorid in each message.
all i thought i wanted to do was this....
<%
If session("userid") = rstemp("authorid") Then
<a href="edit.asp?msgid=22">edit message</a>
End If
%>
But I kept getting an error. Whe i displayed the values of each, both were correct, in this 19 & 19
So that meant that this comparison didnt work
If 19 = 19 Then etc......
????
Very strange. I got round it by adding a letter before each number, so it was
If "a" & session("userid") = "a" & rstemp("authorid") Then etc......
This worked fine. Does this mean you cant compare numbers like i tried too ??
Thanks,
Ben. |
Follow Up - Re: Comparing numbers.... - Steve 10/16/2000 8:28:35 AM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|