c# - Text of the anchor tag passed to the controller -


is possible text of anchor tag passed controller?

<a href="@url.action("searchstudent","home")">student information</a> 

this in view.

when click link, want use "student information" (the inner text) in controller.

how can programmatically? (no hard coding)

i using c#.

thanks in advance.

you can pass routevalues.

in view:

<a href="@url.action("searchstudent","home", new { innertext = "student information" })">student information</a> 

in controller:

public actionresult searchstudent(string innertext) {    // thing.    return view(); } 

Comments

Popular posts from this blog

python 2.7 - Chat Solution for Mobile App -

jquery - Detect current Section with javascript -