I have developed a mobile application using jquerymobile,asp.net mvc3,HTML5. I have a scenario like I need to store guid in the localstorage of the browser using the HTML5 API support for localStorage. I need to store the guid in the localStorage of the browser in case the user authentication succeeds. If user authentication is not succeeding then no need to store the guid in the localstorage.
So here I need to invoke the jquery call from server side after the user authentication succeeds.
Can anyone help me out to provide a sample regarding how to invoke the jquery method after the postback event.
Thanks & Regards,
Santosh Kumar Patro
You shouldnt need to “invoke a jQuery call from server side”. Depending on what your “authentication” call looks like, you can simply set your variable in local storage on the authentication success page, or if you’re have using an .ajax call on the callback (both on client side).
reference for adding to localstorage:
Save Values to HTML5 localStorage -> populate on page load
reference to using callback of ajax call to authenticate:
JQuery Mobile – User Login Best Practice