What is the use of @Html.AntiForgeryToken()?

This is a security feature to help protect your application against cross-site request forgery. Example: Let’s assume you have a register functionality in your web app. You have an AccountController (example.com/account/register) where you expect people to submit their info. Normally before someone posts the registration information needs to visit the actual (example.com/account/register) than submit the … Read more

@Html.BeginForm Displaying “System.Web.Mvc.Html.MvcForm” on Page

The recommended way to generate a form is the following: <div id=”deletestatusupdate”> @if (update.User.UserName.Equals(User.Identity.Name, StringComparison.OrdinalIgnoreCase)) { using(Html.BeginForm(“deleteupdate”, “home”)) { @Html.Hidden(“returnUrl”, Request.Url.ToString()) <button name=”id” value=”@update.StatusUpdateId”>Delete</button> } } </div> Alternatively you could do this: <div id=”deletestatusupdate”> @if (update.User.UserName.Equals(User.Identity.Name, StringComparison.OrdinalIgnoreCase)) { Html.BeginForm(“deleteupdate”, “home”); @Html.Hidden(“returnUrl”, Request.Url.ToString()) <button name=”id” value=”@update.StatusUpdateId”>Delete</button> Html.EndForm(); } </div> The reason why your original approach did … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)