本文介绍了MVC:在razor的代码块中传递jquery var的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 嗨! 我正在努力将一个jquery var传递给Razor中的一个Code块: Hi!I am struggling with passing a jquery var into a Code block in Razor :if ($(window).scrollTop() + $(window).height() > $(document).height() - 200) { var CurrentSeqDB = 1; @Code Dim UserSession As String = Session("UserSessionID") Dim EntryID As Integer = 0 Dim context As TripRebel.LocalEntities = New TripRebel.LocalEntities() Dim testRtsrf As Integer = Request.Params(@:CurrentSeqDB) Dim getHotelsFromDB = (From gh In context.temp_hotels Where gh.Session = UserSession And gh.sequence = Request[""] And gh.shown = "false" Select gh).SingleOrDefault End Code } 任何人都可以帮我吗? 提前感谢!! 干杯Can anyone help me with that?thanks in advance!!Cheers推荐答案 任何人都可以帮我吗? 提前感谢!! 干杯Can anyone help me with that?thanks in advance!!Cheers 这篇关于MVC:在razor的代码块中传递jquery var的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-22 10:07