asp.net mvc - getting actionlist to send current url to actionresult -


i'm trying pass current url actionresult returnurl comes null

    @html.actionlink("create student", "create", "studentcenter", new{ returnurl = request.rawurl}, new { @class = "button" }) 

here's controller

public actionresult create(string returnurl)     {         httpcookie cookie = new httpcookie("redirectcookie",returnurl);         viewbag.sex = new selectlist(enum.getnames(typeof(schoolcup.domain.sex)));         return view();     } 

i think have use this

@html.actionlink("create student", "create", "studentcenter", new{ returnurl = request.rawurl.tostring()}, new { @class = "button" }) 

please try , send me feed back

is expected string "studentcenter/create"?


Comments

Popular posts from this blog

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -