Search This Blog

2010/01/17

using query string

ASP.NET 2.0

Create a new webApplication .Add Following Code to it


Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim UserName As String
UserName = Request.QueryString("Name")
Response.Write("Hello" + " " + UserName + " Have a nice day!")
End Sub
End Class

Now to test it:
Open Internet Explorer in Address Bar write address of our aspx page
followed by ? Name=Sangram.
Add Press Go.

You will see on web form “Hello Sangram have a nice day!”.

No comments:

Post a Comment