How to access JS variable in C#

前端 未结 5 1441
轻奢々
轻奢々 2021-01-15 19:33

Let\'s say I have

500

(Context: asp.net aspx page) How do I allow a c# code access that value?

<
5条回答
  •  自闭症患者
    2021-01-15 20:08

    The C# code inside <% .. %> is run on the server when the HTML is generated. When the value updates via AJAX, it all happens on the client - long after the C# has finished running.

提交回复
热议问题