Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to use session

Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click

Try

Dim sr As New IO.StreamReader(System.AppDomain.CurrentDomain.BaseDirectory & "\\result.txt")
Dim finalresult As Integer = sr.ReadLine</pre>
sr.Close()
Response.Write("<script type='text/javascript'>alert('Your Score is : " & finalresult & "');</script>")</pre>
<pre lang="vb">Dim sw As New IO.StreamWriter(System.AppDomain.CurrentDomain.BaseDirectory & "\\result.txt")
sw.WriteLine(0)
sw.Close()</pre>
<pre lang="vb">Catch ex As Exception

End Try
End Sub&lt;/pre&gt;</pre>
Posted
Comments
OriginalGriff 3-Jun-15 3:32am    
And?
What is the problem?
What do you need help with?
aakash6393 3-Jun-15 3:38am    
How to use session??

1 solution

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave 15 million hits: Google: "Session VB"[^]
And I think the first page covers everything you need to know...probably 10 times.

In future, please try to do at least basic research yourself, and not waste your time or ours.
 
Share this answer
 
Comments
aakash6393 3-Jun-15 3:54am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900