T
timor.super
Hi group,
I'm trying to extend the ImageButton webcontrol to add "Ajax"
functionnality. So, my control implements ICallbackEventHandler and
I'm adding the js callback on onclick event :
protected override void OnInit(EventArgs e)
{
string script = ".........my js script ..........";
Page.ClientScript.RegisterClientScriptBlock(GetType(),
"myscript", script, true);
base.OnInit(e);
}
protected override void OnLoad(EventArgs e)
{
string callbackRef =
Page.ClientScript.GetCallbackEventReference(this, "....my param....",
"ClientCallback", "null", true);
Attributes["onclick"] = callbackRef;
base.OnLoad(e);
}
and a classical implementation for RaiseCallbackEvent and
GetCallbackResult
Everything is ok with IE, but it's not working on Firefox.
When I debug with FF, i can step on RaiseCallbackEvent or
GetCallbackResult, but it seems that the js method is never call
After some googling, i found this post : http://forums.asp.net/t/959825.aspx
where joteke tells us that the field seems to do a postback in FF
the generated html for my control is :
<input type="image" ... onclick="WebForm_DoCallback(....);"
style="border-width:0px;" />
So I can see my control generate an input type image. Is this the
problem ?
What should I do to make it working with FF ?
Do someone have any idea ?
Thanks for your help.
T.
I'm trying to extend the ImageButton webcontrol to add "Ajax"
functionnality. So, my control implements ICallbackEventHandler and
I'm adding the js callback on onclick event :
protected override void OnInit(EventArgs e)
{
string script = ".........my js script ..........";
Page.ClientScript.RegisterClientScriptBlock(GetType(),
"myscript", script, true);
base.OnInit(e);
}
protected override void OnLoad(EventArgs e)
{
string callbackRef =
Page.ClientScript.GetCallbackEventReference(this, "....my param....",
"ClientCallback", "null", true);
Attributes["onclick"] = callbackRef;
base.OnLoad(e);
}
and a classical implementation for RaiseCallbackEvent and
GetCallbackResult
Everything is ok with IE, but it's not working on Firefox.
When I debug with FF, i can step on RaiseCallbackEvent or
GetCallbackResult, but it seems that the js method is never call
After some googling, i found this post : http://forums.asp.net/t/959825.aspx
where joteke tells us that the field seems to do a postback in FF
the generated html for my control is :
<input type="image" ... onclick="WebForm_DoCallback(....);"
style="border-width:0px;" />
So I can see my control generate an input type image. Is this the
problem ?
What should I do to make it working with FF ?
Do someone have any idea ?
Thanks for your help.
T.