Ray,
Casting into String is the best option, since other cast functions give
errors if the input is not numeric (e.g. empty)
If CStr(towhom) = CStr(Session("UserID")) Then...
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP14.phx.gbl...
Have you tried casting your values to the same datatype?
If CInt(towhom) = CInt(Session("UserID"))...
Ray at work
"Savas Ates" <sa***@indexinteractive.com> wrote in message
news:ue*************@TK2MSFTNGP09.phx.gbl...i have 3 columns in sql server ..
all of them are numeric value
when a user enter my site i take the value of userid (numeric one) i
assign
it as session("userid ")
after a query i take 2 value (both numeric again) from my table and
write this code
if towhom=session("userid") then towhom=fromwhom
it gives an error .. how can i solve it
Type Mismatch Error