How to handle controls(ex:- ddl)data by using Client side logic(AJAX) and Server side logic(page load and control event ) in asp.net c#

Viewed 27

I have written both client side and server side logic in asp.net web page but here I'm facing the one issue that is initially I'm loading the drop down list(ddl) data using page_load event data is coming and next I'm calling the AJAX method because if any use select the autocomplete textbox data based on that select data I'm auto filling the reset of all the required fields

Like below image

NIFTY is autocomplete textbox.

auto fill based on use select textbox

if user select the NIFTY autocomplete textbox based on that symbol I'm auto filling the reset of all controls, in the above image shown controls(ce,date ...).

And next I'm using the SelectedIndexChanged event for further logic execution process (ex:- if I select any one of the date based on that date I'm changing the next ddl and ltp data) and this control I'm using under update pane control.

So here I'm facing one issue that is when the page loaded the data is filling into ddl controls and next if user select any symbol using autocomplete textbox then also data is filling fine but if I change any date in ddl the data is refilling of previous loaded ddl data (ex:- if I select nifty the date ddl data count is 5 and next if I select acc in autocomplete text the date ddl data count is 2(this data coming properly) but If I select any one of the date(2) from ddl data here that date ddl data is refilling the previous selected nifty symbol date data coming 5 dates instead of 2.

note :- before I'm adding ddl data using AJAX method, clearing the ddl data by using $('#AutoTradeTop_expdate').empty(); and filling .

Suggest my how to achieve this and where I did the mistake.

In my example scenario can we handle client side and server side logic ?

Sorry for bad English.

0 Answers
Related