Sending data to another page

There are many ways to send data to another page.

QueryString , Context or Session.

The easiest and oldest way is QueryString.

In first page:

Link second page and variable e.g.

NavigateUrl = “~/SecondPage.aspx?variable_to_be_send=1”

In second page:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim sID As String

        sID = Request.QueryString(“variable_to_be_send”)

        ShowNewsText(sID) ‘this is the function that will use the variable

End Sub


About Ahmed

Software craftsman, programmer, developer, system/business analyst, DBA and PM.
This entry was posted in Programming, VB.NET and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s