|
Rank: Member Groups: Member
Joined: 12/12/2010 Posts: 12
|
Hello,
I want to use the server side slider event "onchanged", but it does not fire when moving then Thumb with mouse:
<%@Page ... <%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %> <html> <head> </head> <body> <form id="form1" runat="server"> <div> <eo:Slider runat="server" ID="Slider1" .... onchanged="Slider1_Changed" .... </eo:Slider> </div> </form> </body> </html>
in code: public void Slider1_Changed(object sender, EventArgs e) { //do something; }
Is this a bug or is something missing?
best regards Hans
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Have you tried to set AutoPostBack to true?
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/12/2010 Posts: 12
|
Hello,
I thought about and was looking for autopostback, but I am missing this property, cant find it.
There is no property AutoPostBack, neither in slider nor in sliderbase class.
I tried: Slider.Attributes.Add('AutoPostBack', 'True'); : no result.
best regards Hans
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We misunderstood it as Slide control instead of Slider control. Slider control does not have AutoPostBack. A Slider's OnChange event only occurs when the whole page posts back. For example, if you change the Slider value, then click "Submit" button, you will see the Slider's OnChange event fire. This is very similar to a TextBox's OnChange event. It fires on post back, not when it occurs.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/12/2010 Posts: 12
|
Hello,
you answer is not 100% correct.
Please remember, that there is a autopostback property at Textbox so that the onchange event is fired when changing text without clicking a separate button for postback.
Do have a look at ajax's standard slider control. There is a way to initiate autopostbacks over the onchanged event of the assoziated, not visible Targetcontrol combined with the property "RaiseChangeOnlyOnMouseUp". This works very fine. Your Slider does have the advantage of fine styling possibilities and it would be nice if it would have the possibilities of standard behavior of ajax slider for users to have the feeling of modern .net programming.
|
|