Reputation: 467
I am a newbie in using asp.net, I have a problem on how to transfer these data below on other form!
The scenario is like this after the user clicks the Enter Button it shows a message box that the sales is updated and after that it will transfer to other form that shows in figure 2. Can you give me idea. thanks in advance :D. here's my code.
Date and Time
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'DATE AND TIME
lbl_date.Text = FormatDateTime(Now, DateFormat.LongDate)
lbl_time.Text = FormatDateTime(Now, DateFormat.LongTime)
end Sub
Upvotes: 0
Views: 278
Reputation: 23329
Simply you can send any object via session. In the first form set the session to your datatable object and get it in the second form
Session("dataTable") = datatable
and in the second form get the object stored in the session
Dim data As DataTable = DirectCast(Session("dataTable"), DataTable)
Upvotes: 1