I try to do something really simple that perfectly works on a normal page. In my masterpage, I've got a updatePanel. Inside, there is a asp textbox and an asp button, plus an asp literal. When you click on the button, it fires an event that take the value of the textbox and put it in the literal.
This easy code works well. But when transferring the exact same logic into an Umbraco masterpage, it's stop working. It look like that the value of testTexbox was overide during the postback. It's tried to use Request.Form and umbraco.library.RequestForm with no success.
There is something in the live cycle of the page that brakes my logic, but I can't find it. Can you help me? Thanks!
What does the content of your masterpage look like? I suspect you probably have a server side form <form runat="server"> sorounding all the content on the page, which is probably why it's not working. But please post the code and let's have a closer look :)
Try to check the settings of your ScriptManager and UpdatePanel so that they allow partial page updates and the UpdatePanel is updated on a button click.
Umbraco masterpage is no different than a normal masterpage. Make sure all elements are in a form tag with the runat=server attribute, also make sure you don't have another form runat=server tag on your page and set causesvalidation on your button to false. It could be that "something" is validating the page and blocking the request.
Umbraco and postback value in a ASP.NET page?
Hello,
I try to do something really simple that perfectly works on a normal page. In my masterpage, I've got a updatePanel. Inside, there is a asp textbox and an asp button, plus an asp literal. When you click on the button, it fires an event that take the value of the textbox and put it in the literal.
protected void onClick(object sender, EventArgs e) {
testLiteral.Text = testTexbox.Text;
}
This easy code works well. But when transferring the exact same logic into an Umbraco masterpage, it's stop working. It look like that the value of testTexbox was overide during the postback. It's tried to use Request.Form and umbraco.library.RequestForm with no success.
There is something in the live cycle of the page that brakes my logic, but I can't find it. Can you help me? Thanks!
Not sure why you would want to do this, but should be sinple enough to implement using a user control. Have a look in the Umbraco TV section.
Hi Nicolas
What does the content of your masterpage look like? I suspect you probably have a server side form <form runat="server"> sorounding all the content on the page, which is probably why it's not working. But please post the code and let's have a closer look :)
/Jan
Hi. I've just tried it - and for me it works ok. Here's my snippet:
Try to check the settings of your ScriptManager and UpdatePanel so that they allow partial page updates and the UpdatePanel is updated on a button click.
Hi,
Umbraco masterpage is no different than a normal masterpage. Make sure all elements are in a form tag with the runat=server attribute, also make sure you don't have another form runat=server tag on your page and set causesvalidation on your button to false. It could be that "something" is validating the page and blocking the request.
Cheers,
Richard
is working on a reply...