Nested master pages, controls not doing a right postback
Hi Guys,
This is really weird:
I have a masterpage Under that i have a nested master page.
Once i place a button on the nested master, hook the onclick on some random method and invoke it, i never get a postback. Well, in firebug i see a postback beeing made, a post is made, the viewstate and some hidden fields are send and everything is looking fine.
When on the server, i put a breakpoint on PageLoad and quess what. Page.IsPostback is ALWAYS false. No matter how many times i press the button, try another event or whatsoever. Its always false. Also the actual method subscribed to the event is never called and the viewstate is never loaded
When moving the button UP one level to the root master page, Eveything is ok, I get a nice postback, event subsribers are called and the viewstate is restored.
I've checked for both asp.net syntrax errors and html syntax errors and there were none .
Yeh, way up in the root masterpage (when not counting the umbraco master page)
Its outside any ContentPlaceHolders so it cant be overwritten by nested masterpages. Also, there are no form tags in the nested masterpages, just the one in the root.
Nested master pages, controls not doing a right postback
Hi Guys,
This is really weird:
I have a masterpage
Under that i have a nested master page.
Once i place a button on the nested master, hook the onclick on some random method and invoke it, i never get a postback. Well, in firebug i see a postback beeing made, a post is made, the viewstate and some hidden fields are send and everything is looking fine.
When on the server, i put a breakpoint on PageLoad and quess what. Page.IsPostback is ALWAYS false. No matter how many times i press the button, try another event or whatsoever. Its always false. Also the actual method subscribed to the event is never called and the viewstate is never loaded
When moving the button UP one level to the root master page, Eveything is ok, I get a nice postback, event subsribers are called and the viewstate is restored.
I've checked for both asp.net syntrax errors and html syntax errors and there were none .
The problem can be seen live at: http://www.vvvarnhemnijmegen.nl/arrangementen
When clicking a checkbox, a postback is made which is good but never caught on the server.
This makes my brain hurt, please help!
Below i pasted the markup for a testpage, this is all there is and its not working -_- (missing closing t
<%
@ Master Language="C#" MasterPageFile="/masterpages/PageWithNavigation.master" AutoEventWireup="True" Inherits="InfoCaster.VVVArnhemNijmegen.masterpages.NewArrangementen" CodeBehind="~/masterpages/NewArrangementen.master.cs" %>
<asp:Content ContentPlaceHolderId="Content" runat="server">
<asp:Button runat="server" Text="test" OnClick="test_clicked" />
</
asp:Content>
Obvious question: Is there a <form runat="server"> tag around the contentplaceholder?
Yeh, way up in the root masterpage (when not counting the umbraco master page)
Its outside any ContentPlaceHolders so it cant be overwritten by nested masterpages. Also, there are no form tags in the nested masterpages, just the one in the root.
Problem is fixed.
In the masterpage were three imagebuttons with the postbackurl property set... Apparently this messes with the normal other postbacks
is working on a reply...