Page.ClientScript.GetPostBackEventReference has stopped working for me, custom usercontrol. umbraco 4.11.6
Hi ,
I have some quite complex usercontrols, that i have had installed since umbraco 4.7.2.
I have last week upgraded to umbraco 4.11.6 and found that my usercontrols now didnt work where i am needing some custom postbacks. The form appears to postback, however all textbox values are empty, as if the form has not been posted back at all?
I today have updated step for step from 4.7.2 to 4.11.6 and all has been fine with every step (4.8.0, 4.8.1, 4.9.0,4.9.1, 4.10.1) but as soon as i get to 4.11.6 it stops working. I have of course been looking about in some forums, and i have a runat="server" form, + eventwireup = true on my usercontrol, but that shouldnt be a problem as its umbraco i have updated not the usercontrol, and as stated the usercontrol has worked just fine until now.
if i add a button and click that then all is as expected, but i have some javascripts that i need to run before, and the items im clicking are not buttons that i can add an on click to (And runat=server).
I am creating a postback script like this :
Public partial class usercontrols_DoSomething : System.Web.UI.UserControl{
Page.ClientScript.GetPostBackEventReference has stopped working for me, custom usercontrol. umbraco 4.11.6
Hi ,
I have some quite complex usercontrols, that i have had installed since umbraco 4.7.2.
I have last week upgraded to umbraco 4.11.6 and found that my usercontrols now didnt work where i am needing some custom postbacks. The form appears to postback, however all textbox values are empty, as if the form has not been posted back at all?
I today have updated step for step from 4.7.2 to 4.11.6 and all has been fine with every step (4.8.0, 4.8.1, 4.9.0,4.9.1, 4.10.1) but as soon as i get to 4.11.6 it stops working. I have of course been looking about in some forums, and i have a runat="server" form, + eventwireup = true on my usercontrol, but that shouldnt be a problem as its umbraco i have updated not the usercontrol, and as stated the usercontrol has worked just fine until now.
if i add a button and click that then all is as expected, but i have some javascripts that i need to run before, and the items im clicking are not buttons that i can add an on click to (And runat=server).
I am creating a postback script like this :
Public partial class usercontrols_DoSomething : System.Web.UI.UserControl{
protected string myCustomPostBack;
protected void Page_Load(object sender, EventArgs e){
myCustomPostBack= Page.ClientScript.GetPostBackEventReference(this, "dosomething");
/*Handle checkbox updates for Discounts*/
if (Page.IsPostBack){
string eArg = Request["__EVENTARGUMENT"];
switch (eArg)
{
case "dosomething":
doSomething();
break;
}
}
protected void doSomething(){
Response.Write("HERE is Something");
}
}
and then in my usercontrol adding a function like this
is working on a reply...