T
timor.super
Hi group,
what I would like to do is maybe a little hard and I can't achieve to
make it. So I need your help to go in the right way.
What I want is to create a webcontrol that can use one its properties
value , set with the server-sider onclick event, with client
javascript.
Something like this :
(default.apsx)
<mycontrol:mycontrol runat="server" id="testControl"
OnServerClick="ClickEvent"/>
(default.apsx.cs)
protected override void ClickEvent(EventArgs e)
{
testControl.myProperty = "my value";
}
an when I click on the control, i have a javascript function that
alert the myProperty value.
I know how to set a serverClick event, with IPostBackEventHandler ...
I think I have to deal with ICallbackEventHandler but the alert
javascript function comes too earl and can't know the value of
myProperty, and I don't want the page to be postbacked entirely
because alert function has to come just on the clientclick.
Maybe the good solution is to make something like an autopostback =
true, but I don't know how to make it.
How would you do something like that ?
Thanks for your help.
T.
what I would like to do is maybe a little hard and I can't achieve to
make it. So I need your help to go in the right way.
What I want is to create a webcontrol that can use one its properties
value , set with the server-sider onclick event, with client
javascript.
Something like this :
(default.apsx)
<mycontrol:mycontrol runat="server" id="testControl"
OnServerClick="ClickEvent"/>
(default.apsx.cs)
protected override void ClickEvent(EventArgs e)
{
testControl.myProperty = "my value";
}
an when I click on the control, i have a javascript function that
alert the myProperty value.
I know how to set a serverClick event, with IPostBackEventHandler ...
I think I have to deal with ICallbackEventHandler but the alert
javascript function comes too earl and can't know the value of
myProperty, and I don't want the page to be postbacked entirely
because alert function has to come just on the clientclick.
Maybe the good solution is to make something like an autopostback =
true, but I don't know how to make it.
How would you do something like that ?
Thanks for your help.
T.