diff --git a/FirstMVCDemo/Controllers/HomeController.cs b/FirstMVCDemo/Controllers/HomeController.cs index 94c28dc..fd52f67 100644 --- a/FirstMVCDemo/Controllers/HomeController.cs +++ b/FirstMVCDemo/Controllers/HomeController.cs @@ -9,9 +9,9 @@ namespace FirstMVCDemo.Controllers public class HomeController : Controller { // GET: Home - public string Index(string id, string name) + public ActionResult Index() { - return "Id = " + id + ", Name = " + Request.QueryString["name"]; + return View(); } } } \ No newline at end of file diff --git a/FirstMVCDemo/FirstMVCDemo.csproj b/FirstMVCDemo/FirstMVCDemo.csproj index 1aec46e..1cd21ab 100644 --- a/FirstMVCDemo/FirstMVCDemo.csproj +++ b/FirstMVCDemo/FirstMVCDemo.csproj @@ -102,6 +102,7 @@ + Web.config @@ -112,7 +113,6 @@ - 10.0 diff --git a/FirstMVCDemo/Views/Home/Index.cshtml b/FirstMVCDemo/Views/Home/Index.cshtml new file mode 100644 index 0000000..2c27dc6 --- /dev/null +++ b/FirstMVCDemo/Views/Home/Index.cshtml @@ -0,0 +1,18 @@ + +@{ + Layout = null; +} + + + + + + + Index + + +
+

Index View Coming From Views/Home Folder

+
+ +