Link to home
Create AccountLog in
Avatar of Dovberman
DovbermanFlag for United States of America

asked on

Copy textbox content from a textbox on the current asp.net page to a textbox on a target page

I have two asp.net pages in the same project.
Source.aspx and Target.aspx

Controls: Source.aspx, txtBoxSource
Target.aspx, txtBoxTarget

Psuedocode in code behind

string strSource = txtBoxSource.Text;

Reference Target.aspx as TargetDocument
TargetDocument.FindControl(txtBoxTarget)
txtBoxTarget.Text = strSource;

Please help with syntax,

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rouchie
Rouchie
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Dovberman

ASKER

This means that I need to open the target page. Can I refer to the target page while on the Source page?

Thanks,
No you can only do it the other way around, refer to controls in the previous page.  

http://msdn.microsoft.com/en-us/library/ms178139%28v=vs.100%29.aspx
http://msdn.microsoft.com/en-us/library/ms178139%28v=vs.100%29.aspx  does not help.

The PreviousPage property is not available. The class System.Web.UI.Page is not available.
Thanks