How to get text From Page1 to Page2?
-
Dear Programmer, I am developing an application in ASP.NET using language VB.NET. I have created two pages named Page1 and Page2. On Page1 I have placed two textboxes to get input from the user and also put a button. I want that the data which I input in the textboxes placed on Page1 will be displayed on Page2. Please tell me what shall I do to accomplish my task. You can tell me on this ID: zeeshan_st2003@yahoo.com Waiting for your reply. Your Friend, Zeeshan Ahmad Memon.
-
Dear Programmer, I am developing an application in ASP.NET using language VB.NET. I have created two pages named Page1 and Page2. On Page1 I have placed two textboxes to get input from the user and also put a button. I want that the data which I input in the textboxes placed on Page1 will be displayed on Page2. Please tell me what shall I do to accomplish my task. You can tell me on this ID: zeeshan_st2003@yahoo.com Waiting for your reply. Your Friend, Zeeshan Ahmad Memon.
you can pass data between pages in multiple ways: 1. store the data in session and then redirect (response.redirect or server.transfer) to the next page and access the data from session. 2. you can pass data in query string 3. you can set postbackurl for the button and then access the values from the previous page using Request.Form like:
in page 1 do this: <asp:Button ID="button1" Runat=server Text="submit" PostBackUrl="~/Page2.aspx" /> and then on page 2 use string field1data = Request.Form("fieldfrompage1"); `4. you can access the previous page controls using PreviousPage.Controls.. ----- `
-
Dear Programmer, I am developing an application in ASP.NET using language VB.NET. I have created two pages named Page1 and Page2. On Page1 I have placed two textboxes to get input from the user and also put a button. I want that the data which I input in the textboxes placed on Page1 will be displayed on Page2. Please tell me what shall I do to accomplish my task. You can tell me on this ID: zeeshan_st2003@yahoo.com Waiting for your reply. Your Friend, Zeeshan Ahmad Memon.
In ASP.NET 2.0, you can use cross-page postbacks to accomplish this. Have a look at this article[^].
Zeeshan Memon wrote:
You can tell me on this ID: zeeshan_st2003@yahoo.com
No. I answer questions on this forum for everyone's benefit, not just yours.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush