Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DeleteBook(idimg) {
- // idimg is a string
- var userConfirm = window.confirm('Are you sure?');
- if (userConfirm == true) {
- Session["forDelete"] = a; //doesn't work
- window.open('Delete.aspx');
- }
- else
- return false;
- }
- Session["MySession"] = ...;
- $.ajax({
- type: "POST",
- url: "Default.aspx/SetSession",
- data: "{MyValue:a}",
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function(msg) {
- // Do something interesting here.
- }
- });
- public partial class Default : Page
- {
- [WebMethod]
- public static string SetSession(string MyValue)
- {
- Session["forDelete"] = MyValue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement