Hi all I'm using the following jQuery function to populate a dropdown list. Once the user selects an item I am storing the selected value in a session variable and Im able to get the data back from the session variable via a hidden filed in to a variable (selectedApp) after a postback.
The problem is that after a postback I am not able to set the list back to the selected item that teh use selected before clicking submit.
How can I set the selected item in the drop down list to be the selected item?
var selectedApp = $('#selectedApplication').val();
$.getJSON("/ApplicationSettings/Applications/List", function(data) {
var items = "<option>----------- Select Application to Configure ----------</option>";
$.each(data, function(i, application) {
items += "<option value='" + application.Value + "'>" + application.Text + "</option>";
});
$("#Applications").html(items);
});