How do you pass variables from c# to javascript?

后端 未结 5 1727
無奈伤痛
無奈伤痛 2020-11-29 08:20

Looking to pass variables from c# to javascript to use some jquery code. Passing doubles, ints, strings, arrays. Does anyone know how to do this?

for example if I ha

5条回答
  •  被撕碎了的回忆
    2020-11-29 08:55

    I recently used this ToJson() extension method along with Page.RegisterClientScriptBlock Method to pass down a multi-level mapping object that populates three levels of cascaded dropdowns.

提交回复
热议问题