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 - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -