I need to pass the value one page javascript to another page javascript particular functionality . I ma using the mvc function the two pages are different controller cshtml pages. How to pass the value one cshtml to another one cshtml. I try this code but not trigger. Please forward your knowledge
view1:
b.on('click', function () {
document.location.href = +'/view2.cshtml?Id=' + sData; // notes:
});
view2:
var data = $_POST['Id'];
function work(data) {
// my code
}
notes:
I dont know how to mention the particular view2. Because i have lot of controller every controller have the same view2 name. This code goes to the my current controller view 2