Modify controller to take parameters
parent
8a27860218
commit
ccba65247b
|
@ -14,16 +14,18 @@ namespace MvcMusicStore.Controllers
|
||||||
return "Hello from Store.Index()";
|
return "Hello from Store.Index()";
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// GET: /Store/Browse
|
// GET: /Store/Browse?genre=?Disco
|
||||||
public string Browse()
|
public string Browse(string genre)
|
||||||
{
|
{
|
||||||
return "Hello from Store.Browse()";
|
string message = HttpUtility.HtmlEncode("Store.Browse, Genre is " + genre);
|
||||||
|
return message;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// GET: /Store/Details
|
// GET: /Store/Details/5
|
||||||
public string Details()
|
public string Details(int id)
|
||||||
{
|
{
|
||||||
return "Hello from Store.Details()";
|
string message = "Store.Details, ID = " + id;
|
||||||
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue