I have a function written on some another page load event.i want to open new page and write content (such as textbox value) to newly opened page
function updateUser() {
$("button").on("click", function () {
var code = $(this).attr('id');
$.ajax({
url: '/ajaxExecute.aspx?Fn=GETUSERFORUPDT',
type: 'POST',
context: document.body,
data: 'Code=' + code,
cache: false,
success: function (response) {
if (response != 'undefined') {
window.location = 'AddEditUser.aspx';
$('#txtUserName').val(response.split("|")[0]);
}
}
});
});
}
Textbox with id txtUserName
lies in page AddEditUser.aspx
& function updateUser()
load in another .aspx page
My Page loads but not able to get value in textbox
as i am able to get value using alert()
I refer this links but still cudnt figure out