How to share a C# Integer variable with JavaScript

前端 未结 3 1680
死守一世寂寞
死守一世寂寞 2021-01-20 14:31

I want to share the currentTab variable which exists on the C# server side with JavaScript. Here is my code:

C#:

public         


        
3条回答
  •  忘掉有多难
    2021-01-20 15:05

    Have a server side hidden field to hold this piece of information.

    You can access the field through javascript and as a server side control the value will be available server side.

提交回复
热议问题