Click here to Skip to main content
13,047,502 members (62,952 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i m trying to access a textbox text from one page in another page. using server.Transfer("a.aspx",true), a.aspx is opening, but am unable to access textbox through Request["textBox1"]
Posted 16-Jul-12 19:47pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use PreviousPage to access that
TextBox txt = (TextBox)Page.PreviousPage.FindControl("textBox1");

More details can be found here:[^]
Sandeep Mewara 17-Jul-12 2:10am
5! That would be best fit here based on whatever info shared.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The way you are trying to access the value of control from previous page is not correct.
As suggested, either you go with Previous Page concept OR you need to follow other state management techniues to access the textbox value.
Other suggestible ways would be:
1. Session
2. QueryString

Have a look at details of them here:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 17 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100