Hi,
The easiest way is to have a textbox on your form "A". Then in the button
code put this:
Session("MyText") = Textbox1.Text
Then in the Form_Load() event of your form "B" set your label:
Label1.Text = CStr(Session("MyText"))
Session("MyText") = Nothing 'Clears the session to release server resources.
Alternately you could send it via a QueryString:
In the button code:
Response.Redirect("PageB.aspx?MyText=" + Textbox1.Text)
In the Form_Load()
Label1.Text = CStr(Request("MyText"))
For now I would use the Session object until you learn how to Encode query
strings that include spaces and special characters. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@hotmail.com> wrote in message
news:O$****************@tk2msftngp13.phx.gbl...
OK, it's work :)
But now I have one more question:
I want to make message window what I mean:
I want to creat some form "B" and put a label on it, then from form "A" I
want to show form "B" with my text on label, I must to be able to set the
text of label on form "B" from form "A".
How ca I do this?
Than You.
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi,
You need to create a click event for your button and do a
Response.Redirect():
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnButton1.Click
Response.Redirect("PageB.aspx")
End Sub
Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
"Dave" <da*********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl... Hello.
Sorry me, if it's some basic question, but I'm new in ASP.NET:)
How do I show the othe web form from my code?
I mean I have a button on form "A" and I want to go to form "B" when I
click on the button on form "A"?
Thank You.