asp.net mvc - Unsure about parameter -
i working on beginner's mvc tutorial. wondering if explain how or parameters of method chosen?
public actionresult details(int id) { var album = storedb.albums.find(id); return view(album); }
there 2 ways id parameter populated:
http://www.example.com/{controller}/details/{id}
or
http://www.example.com/{controller}/details?id={id}
where {controller} name of controller, eg. name of homecontroller.cs "home" , {id} int.
Comments
Post a Comment