Posts by Junior Roberto • 21 points
2 posts
-
0
votes1
answer42
viewsA: How to transfer a javascript variable to c# aspnet
Pass that id by ajax in your script (I’m using jquery in the example below): <script> $("#btnXxx").click(function () { var request = $.ajax({ url: "/Home/Teste", type: "POST", data: { id: id…
-
2
votes1
answer384
viewsA: Passing a javascript variable to Session
Why not send this id to the controller using json and put it in a viewbag, and use it in the view?