javascript - Preprocessor directives must appear as the first non-whitespace character on a line (KendoUI) -


i have problem in script part of mvc.

<script>     @html.actionlink("edit", "edit", new { id= #= userid # }) <script> 

when write @, # gives error. kendoui grid (opensource), can table id using #= userid # . need id. how?

may problem in merging client side logic , backend.

@html.actionlink() 

this asp.net backend code, generates before client side logic run, but

#= userid # 

is client side code, , run in browser kendo grid system.

in case try run backend generator through client side kendo grid, impossible.

to fix problem , had functionality want, need or pass userid across backend variable @userid, or paste simple html code

<a href="http://url" id="#= userid #">text</a> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -