hi there
I have two web pages designed with ASP.net on VB
I want to send parameter from the first to the second when I open it

and I have this code in the first page :

Response.Redirect("second.aspx? name=" & usernametxt.Text())

and then in the second page_load

stdnamelbl.Text = Request.QueryString("name")

as I suppose this must work, right? but it does not it takes me to the second page but does not show the content in the label (stdnamelbl) although the name=....... appeared in the address bar of the explorer

your help is appreciated a lot
thanks

hi,
since the textbox content is string ,u should declare the querystring in string format
ie
name='"& textbox.text &"'
hope this helps

hi
thanks for replying,

it still does not show up on the label in the next page I do not know why although I see the value transfered in the address bar with the URL
is the request.querystring correct?

OR if there is another way to do it I will do , I will do anything to get it done anything

idea: define a vb class containing the userId(the variable I need to be transfered) but I need to know how to make the object of this class be seen from all forms in the project(website)
I know that I should use static somewhere but I do not know where and how exactly

the class is like this for example:

Public Class User
Dim user_id As String

Public Property Name() As String
Get
Return user_id
End Get
Set(ByVal value As String)
user_id = value
End Set
End Property

End Class

any help will be appreciated
Thanks

hii,
why dont u use sessions in that application.
session("name")=textbox.text
in the next page
label.text=session("name").tostring

hiiiiii,
thaaaaaaaaaaaaaanks a lot it helped very well
:) it get my work done thanks
but I have another question

I have a datasource in my page then I want to get a value from it according to a condition
example : to get a name according to an id

note I need the datasource because I am using gridview
thanks

hiiiiii,
thaaaaaaaaaaaaaanks a lot it helped very well
:) it get my work done thanks
but I have another question

I have a datasource in my page then I want to get a value from it according to a condition
example : to get a name according to an id

note I need the datasource because I am using gridview
thanks

Hey there,

Start a new thread for this question-- since the original issue has been resolved, people might not look at this other question you have. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.