c# - How to Pass value from @Url.Action to contoller in mvc? -


i trying pass value @url.action controller taking contoller/action/id , returns "no view found". below code

view

<a href="@url.action("index", "directputawaydetails", new { id = @home[j].test.tostring()})" class="ui-li-has-count" data-role="button"  data-ajax="false" data-mini="true" style="background-color:#52616d;color:white">                 @home[j].test.tostring() <span class="ui-li-count ui-btn-up-c ui-btn-corner-all" style="background-color: white; color: #52616d">@home[j].think.tostring() </span></a> 

controller

    public actionresult index(string id)     {           directsearch.home.test = id;          return view()         } 

i unable assign id value home.test model property. displays

object reference not set instance of object.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -