asp.net - Active Index is not being persisted in jQuery accordion change event -


I have an asp.net aspx page and on that page I have the hidden input field and id of paneIndex. , When I load the page, the alert 1 indicates a pointer which is correct on the first load, but for example if I open 3, then Alert 1 still shows whether I am doing something wrong?

In a Custom.js file, I have the following code:

  $ (document) .ready (function () {$ ("Accordion ('active' 1 , Narrow: true, autohite: wrong, change: function (event, UI) {var activeIndex = $ ("# accordion") .adrian ('option', 'active'); $ ("# pence index"). (ActiveIndex); // Alert (activeindex);}});});  

In my server side button click, I have the following code:

 < Code> string active index = request. Farm ["pandex"]; string script = string C. Format (@ "& lt; script type =" "text / javascript" "> index = {0}; "; active index;); if (! ClientScript.IsStartupScriptRegistered ("JSScript")) ClientScript.RegisterStartupScript (this.GetType (), "JSScript", script); I have just tested jquery script locally and it works fine for me without form;  

So I think that your problem form submission / active Is not attached to Dax variable is not set correctly.

If you use asp.net, do you use the form instead of using postback? If I try to postback on a server instead of form submission.

If you use Visual Studio, you can also try setting a breakpoint on the server-side code and check the request. After presenting the FARM collection, the correct variables are included.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -