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,
This is just a follow up on the thread on the setup you have in particular for the web parts and master page. How is this created along with the aspx markup?
Let me know if you have any questions with this matter.
Sincerely,Duane HoytDeveloper Support Engineer, MCTSInfragisticshttp://ko.infragistics.com/support
Yes the most straightforward way is to set the AutoPostBack flag for ValueChanged attribute to "On".
Part of the ASP.NET lifecycle, Page Load always gets executed by every postback. The IsPostBack is just a property that returns whether a postback has occurred.
What's the aspx markup that you have setup for the web parts and the master page? It would help to troubleshoot and look into it further by knowing how the page is setup.
Thank you for your reply.
You suggest I should rely on autopostback flags.
However, no postback is being triggered in my codebase. I have proven that be stripping out code to a basic ASP.NET label update within the server side code.
However, If I go with a single form, the postback occurs; but, if I use the ASP.NET page within a web parts framework (within a master page/form), no postback occurs.
But then you say the Page_Load executes before the _ValueChanged event. The Page_Load executes only on the initial page display or is it fired every time the postback takes place on the controls? That could be the issue... Can the Page_load be suppressed by checking the value "ispostback" or need the Page_Load routine be executed? This could resolve our issue - if Page_Load execution can be suppressed.
I hope that helps!
For allowing the control to have a postback all there is needed is to set the AutoPostBackFlags ValueChanged attribute to "On". There is no javascript code needed to perform a postback, only setting some attributes to the control is required.
You can also define the server side event ValueChanged in the page load event:
WebSlider1.ValueChanged += new Infragistics.Web.UI.EditorControls.SliderValueChangedEventHandler(WebSlider1_ValueChanged);
So in the typical asp.net lifecycle the page load event goes first and then the ValueChanged event of the control is after.
If you are still having issues, you can attach a sample to this thread that reproduces the issue you're experiencing and I can take a look at it.
Although you replied and offered valuable input, as you can see I am still "stuck" on the postback.
Have you any update?
Thank you.