Page.PreviousPage.FindControl
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I have a page with a textbox and a button. The button opens a dialog where the user selects a customer account number from a grid. Once the selection is made, the dialog should close and the textbox on the parent page should now display the customer account number. I did some research (I'm using ASP.Net 2.0) and it seems like I want to use something like this on the parent page: void Page_Load(object sender, EventArgs e) { TextBox SearchTerm; SearchTerm = (TextBox)Page.PreviousPage.FindControl("CustomerAccount"); Label1.Text = CustomerAccount.Text; } So I guess I would set the customer account field on the dialog and then close it ?