Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have 2 pages parent page and child I want to access the textboxes in the child page when I am in the parent page. is it possible?
Posted

1 solution

There is a concept in asp.net called Cross Page Postback. This concept tells that you can postback to a different page and can access the objects/controls of the target page int the source page(where you have been posted).

Check out below article, this might help you.
Postback and Cross Page Posting in ASP.NET [^]
 
Share this answer
 
Comments
Bob712 5-Jan-15 9:22am    
I did like the example but I always have a null reference exception moreover I want to change the text of the textbox in the child page from the parent page
Praveen Kumar Upadhyay 5-Jan-15 9:36am    
Before doing anything in the posted page. Try checking

if (Page.PreviousPage != null && Page.PreviousPage.IsCrossPagePostBack)
{
//here pass your code
}

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900