I have an application with five webslider controls on one screen. Each has "ValueChanged" set to ON. I am using VS2008 (with SP1).
I have code associated with each _ValueChanged(object sender, EventArgs e) event - but the code does not appear to be executing; I added a pop-up message when the event-routine is executed and the pop-up never occurs.
How do you recommend I troubleshoot this further?
Should I delete the code for ValueChanged event and setup the ValueChanged events again?
ADDED: I changed the ValueChanged property from ON to ASYNC and that helped resolve the issue.
ADDED: I thought at one point this was resolved but it is still an open-issue. Please read my reply below.
Hello Wayne,
For the ValueChanged client side event should be checked in the ClientEvents node of the markup so for example:<ClientEvents ValueChanged="WebSlider1_ValueChanged" />
So the function should look like this:function WebSlider1_ValueChanged(sender, eventArgs) {
}
The signature is the same for the client events on our current infragistics controls with sender and eventArgs.
When you go to design view of the aspx page in Visual Studio, you can go to properties and then expand ClientEvents. Then scroll down to ValueChanged, open the dropdown, and choose add new handler. The function will be added in the script tag. This is a way to know the signature of the method being called.
Let me know if you have any questions with this matter.
Sincerely,Duane HoytDeveloper Support Engineer, MCTSInfragisticshttp://ko.infragistics.com/support
Thank you for your reply.
However, I can not get the application to execute a postback.
My employer does not want to use client-side scripting; they say if it takes more time to execute, so be it. But I cannot get the postback to execute at all.
That said, I have this setup in test.aspx:
<ig:WebSlider ID="webslider_PriceSlider" runat="server" ContentAlignment="TopOrLeft" EnableTheming="True" Height="60px" Width="275px"> <Thumb ImageUrl="~/Images/slider_handle.gif" FocusImageUrl="~/Images/slider_handle.gif" HoverImageUrl="~/Images/slider_handle.gif" PressedImageUrl="~/Images/slider_handle.gif" /> <AutoPostBackFlags ValueChanged="Async" /></ig:WebSlider>
<asp:Label Font-Bold="True" Font-Size="12px" ForeColor="Black" ID="lblPriceSlider"runat="server" BorderStyle="None"></asp:Label>
In the ASP.NET application, I have code for _ValueChanged. For some reason, when the slider value changes, its not being executed. The control lblPriceSlider.Text is not being updated.
protected void webslider_PriceSlider_ValueChanged(object sender, EventArgs e){ lblPriceSlider.Text = webslider_PriceSlider.Value.ToString();}
This is not being executed. the lblPriceSlider is not being updated.
Although my employer does not want client-side scripting, I tried adding Javascript code through VS2008. However, if I try adding a client-side event in Javascript to the code in VS2008 through the webslider control's properties, I get this error:
Failure to add SCRIPT block to page.Please, before using "Add new handler..." option, try to select control differently. For example, click on the border of the control.If it fails as well, then you should type-in the name of a function and add SCRIPT block manually. The javascript block with the implementation of that function should appear within the HEADER of page or at another appropriate location.
With this error, it appears to me there a bug in the webslider control preventing a postback from occuring.
As I said in another post, I took over this project...I am replacing the AJAX slider extender with the NetAdvantage WebSlider control.
Do you see anything obvious?
How can I force a postback? What is the code for a postback?
Please help.