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

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -