Click to See Complete Forum and Search --> : how to convert the type of session variable


venkat
07-20-2001, 01:59 AM
hai
i tried to increment the value of a session variable
i declared like this
<% session("marks")%> =0

i tried to increment
markss = <%session("marks")

markss = markss+1

marls<% response.write(markss)
it writes in the browser as marks 10

any suggestion

Sachin
07-20-2001, 05:43 AM
use CInt Function if it is holding Integer or CSng if holding Single/Float:-

markss = Cint(Session("marks"))

Tia
Sachin
"venkat" <venkatesan_ram@eudoramail.com> wrote in message
news:3b57c8dc$1@news.devx.com...
>
> hai
> i tried to increment the value of a session variable
> i declared like this
> <% session("marks")%> =0
>
> i tried to increment
> markss = <%session("marks")
>
> markss = markss+1
>
> marls<% response.write(markss)
> it writes in the browser as marks 10
>
> any suggestion