Jquery - Pass asp button command argument with jquery

前端 未结 5 1665
野的像风
野的像风 2020-12-18 07:11

I have asp button:


         


        
5条回答
  •  囚心锁ツ
    2020-12-18 07:40

    Or you can try this one:

    
    
    ...
    
    
    

    'OtherInformation' can be replaced by any string or variable.
    e.g.
    $('#calendar').fullCalendar('getDate').getMonth()+','+$('#calendar').fullCalendar('getDate').getFullYear()

    CodeBehindFunction is the code behind function that executes on the server when you click the button (e.g. a button that prints a report and needs jquery values in codebehind function).
    In codebehind function you can get the arguments by Request.Form["__EVENTARGUMENT"]

    protected void CodeBehindFunction(object sender, EventArgs e)
    {
     string arguments = Request.Form["__EVENTARGUMENT"];
     ...
    }
    

提交回复
热议问题