From 0fe79d94b3851128758e99321a24413951258885 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Thu, 1 May 2014 10:20:11 -0700 Subject: [PATCH] Updating musicstore code to use the ValidationMessageFor Html helper. --- src/MusicStore/Views/Account/Login.cshtml | 4 ++-- src/MusicStore/Views/StoreManager/Create.cshtml | 10 +++++----- src/MusicStore/Views/StoreManager/Edit.cshtml | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/MusicStore/Views/Account/Login.cshtml b/src/MusicStore/Views/Account/Login.cshtml index 7e26425..afe53c3 100644 --- a/src/MusicStore/Views/Account/Login.cshtml +++ b/src/MusicStore/Views/Account/Login.cshtml @@ -20,14 +20,14 @@ @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) - @*@Html.ValidationMessageFor(m => m.UserName)*@ + @Html.ValidationMessageFor(m => m.UserName)
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
@Html.PasswordFor(m => m.Password, new { @class = "form-control" }) - @*@Html.ValidationMessageFor(m => m.Password)*@ + @Html.ValidationMessageFor(m => m.Password)
diff --git a/src/MusicStore/Views/StoreManager/Create.cshtml b/src/MusicStore/Views/StoreManager/Create.cshtml index c82d12d..27f45c3 100644 --- a/src/MusicStore/Views/StoreManager/Create.cshtml +++ b/src/MusicStore/Views/StoreManager/Create.cshtml @@ -22,7 +22,7 @@ @Html.LabelFor(model => model.GenreId, "GenreId", new { @class = "control-label col-md-2" })
@Html.DropDownList("GenreId", String.Empty) - @*@Html.ValidationMessageFor(model => model.GenreId)*@ + @Html.ValidationMessageFor(model => model.GenreId)
@@ -30,7 +30,7 @@ @Html.LabelFor(model => model.ArtistId, "ArtistId", new { @class = "control-label col-md-2" })
@Html.DropDownList("ArtistId", String.Empty) - @*@Html.ValidationMessageFor(model => model.ArtistId)*@ + @Html.ValidationMessageFor(model => model.ArtistId)
@@ -38,7 +38,7 @@ @Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Title) - @*@Html.ValidationMessageFor(model => model.Title)*@ + @Html.ValidationMessageFor(model => model.Title)
@@ -46,7 +46,7 @@ @Html.LabelFor(model => model.Price, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Price) - @*@Html.ValidationMessageFor(model => model.Price)*@ + @Html.ValidationMessageFor(model => model.Price)
@@ -54,7 +54,7 @@ @Html.LabelFor(model => model.AlbumArtUrl, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.AlbumArtUrl) - @*@Html.ValidationMessageFor(model => model.AlbumArtUrl)*@ + @Html.ValidationMessageFor(model => model.AlbumArtUrl)
diff --git a/src/MusicStore/Views/StoreManager/Edit.cshtml b/src/MusicStore/Views/StoreManager/Edit.cshtml index 3c1ec49..97b5281 100644 --- a/src/MusicStore/Views/StoreManager/Edit.cshtml +++ b/src/MusicStore/Views/StoreManager/Edit.cshtml @@ -22,7 +22,7 @@ @Html.LabelFor(model => model.GenreId, "GenreId", new { @class = "control-label col-md-2" })
@Html.DropDownList("GenreId", String.Empty) - @*@Html.ValidationMessageFor(model => model.GenreId)*@ + @Html.ValidationMessageFor(model => model.GenreId)
@@ -30,7 +30,7 @@ @Html.LabelFor(model => model.ArtistId, "ArtistId", new { @class = "control-label col-md-2" })
@Html.DropDownList("ArtistId", String.Empty) - @*@Html.ValidationMessageFor(model => model.ArtistId)*@ + @Html.ValidationMessageFor(model => model.ArtistId)
@@ -38,7 +38,7 @@ @Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Title) - @*@Html.ValidationMessageFor(model => model.Title)*@ + @Html.ValidationMessageFor(model => model.Title)
@@ -46,7 +46,7 @@ @Html.LabelFor(model => model.Price, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Price) - @*@Html.ValidationMessageFor(model => model.Price)*@ + @Html.ValidationMessageFor(model => model.Price)
@@ -54,7 +54,7 @@ @Html.LabelFor(model => model.AlbumArtUrl, new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.AlbumArtUrl) - @*@Html.ValidationMessageFor(model => model.AlbumArtUrl)*@ + @Html.ValidationMessageFor(model => model.AlbumArtUrl)