Howard Katz
asked on
Master Page and Update Panel problem
Good morning Experts,
I have a Master page with a script mgr on it and a Content page with an Update Panel.
On the Master page i have a textbox (ID = txtSearchByNumber)
and a imagebutton (ID= ibtnSearchByQuote) .
I expose the textbox.text property on the master page as QuoteNumber.
I registered the imagebutton click event like this: ScriptManager1.RegisterAsy ncPostBack Control(ib tnSearchBy Quote)
I have this tag on the Content page: <%@ mastertype virtualpath="~/Quote.maste r" %>
In the Page Load of the Content page, I am able to get the value of the textbox from the Master Page by
Master.QuoteNumber.
I run a Select statement using the Master.QuoteNumber value in my where clause. All seems well. All the textboxes are set with the proper values when I step throug the code behind of the Content page.
Problem is that the Master Page seems to load again and the changes are wiped out
HELP !!!
I have a Master page with a script mgr on it and a Content page with an Update Panel.
On the Master page i have a textbox (ID = txtSearchByNumber)
and a imagebutton (ID= ibtnSearchByQuote) .
I expose the textbox.text property on the master page as QuoteNumber.
I registered the imagebutton click event like this: ScriptManager1.RegisterAsy
I have this tag on the Content page: <%@ mastertype virtualpath="~/Quote.maste
In the Page Load of the Content page, I am able to get the value of the textbox from the Master Page by
Master.QuoteNumber.
I run a Select statement using the Master.QuoteNumber value in my where clause. All seems well. All the textboxes are set with the proper values when I step throug the code behind of the Content page.
Problem is that the Master Page seems to load again and the changes are wiped out
HELP !!!
The Master Page Load always occurs after the content Page Load event. The Page_LoadComplete event of the content page occurs after master page load.
ASKER
So, what should I do differently?
Instead of running your select statement in the page load event, run it in the page loadcomplete event.
ASKER
In the Master or Content page? I have gotten it to work but I ran it in the Page_load event of the Master page. It was quite cumbersome because I had to create instances of each control type and then do a FindControl. Here is ex:
Dim DOA As TextBox = MainContent.FindControl("C L1_f_48")
DOA.Text = MyReader("f_48")
Could you be a bit more explicit.
THanks
Howard
Dim DOA As TextBox = MainContent.FindControl("C
DOA.Text = MyReader("f_48")
Could you be a bit more explicit.
THanks
Howard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.