ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.XSRF Token Size in MVC<p>Hi,</p> <p>Just wanted to know what is the XSRF / CSRF token size in MVC. Googled it but no luck.</p> <p>&nbsp;</p> <p>Thanks in advace.</p>https://www.aspforums.net:443/Threads/181084/XSRF-Token-Size-in-MVC/https://www.aspforums.net:443/Threads/181084/XSRF-Token-Size-in-MVC/Thu, 23 Nov 2017 22:33:27 GMTWhy multiple _RequestVerificationToken used in ASP.Net MVC<p>My application in mvc asp.net for database I am using sql server I had <strong>Cross-Site Request Forgery (CSRF)</strong> in my application for so I put <strong>@Html.AntiForgeryToken()</strong> in view and in controller I add <strong>[ValidateAntiForgeryToken]</strong> I am getting two <strong>RequestVerificationToken</strong> as mention in images</p> <p><img src="https://i.imgur.com/XjdywQ1.png" alt="" width="472" height="150" /></p> <p><strong>In View</strong>&nbsp;</p> <pre class="brush: csharp"> &lt;div class=&#34;login-wrapper&#34;&gt; &lt;div id=&#34;login&#34; class=&#34;login loginpage col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-offset-3 col-sm-6 col-xs-offset-0 col-xs-12&#34;&gt; &lt;h1&gt;&lt;a href=&#34;#&#34; title=&#34;Login Page&#34; tabindex=&#34;-1&#34;&gt;ESH HRMS&lt;/a&gt;&lt;/h1&gt; @using (Html.BeginForm(&#34;login&#34;, &#34;admin&#34;, FormMethod.Post,new { ReturnUrl = ViewBag.ReturnUrl })) { @Html.AntiForgeryToken() &lt;p&gt; &lt;label for=&#34;user_login&#34;&gt; Username&lt;br /&gt; @Html.TextBoxFor(m =&gt; m.LoginID, new { @class = &#34;input&#34;, @id = &#34;txtUserName&#34;, @placeholder = &#34;UserName&#34;, @size = &#34;20&#34; }) &lt;/label&gt; &lt;/p&gt; &lt;p&gt; &lt;label for=&#34;user_pass&#34;&gt; Password&lt;br /&gt; @Html.TextBoxFor(m =&gt; m.Password, new { @class = &#34;input&#34;, @id = &#34;txtPassword&#34;, type = &#34;password&#34;, @size = &#34;20&#34; }) &lt;/label&gt; &lt;/p&gt; &lt;p&gt; &lt;div class=&#34;g-recaptcha&#34; style=&#34;width:130%;&#34; data-sitekey=&#34;6LdY2TMUAAAAAEmHk8ZeNF3AwdJ8D92Lm-U3LinQ&#34;&gt;&lt;/div&gt; &lt;/p&gt; &lt;p class=&#34;forgetmenot&#34;&gt; &lt;label class=&#34;icheck-label form-label&#34; for=&#34;rememberme&#34;&gt; @Html.CheckBoxFor(m =&gt; m.RememberMe, new { @class = &#34;skin-square-orange&#34;, @id = &#34;rememberme&#34; }) Remember me &lt;/label&gt; &lt;/p&gt; &lt;p class=&#34;submit&#34;&gt; &lt;input type=&#34;submit&#34; name=&#34;wp-submit&#34; id=&#34;btnSubmit&#34; class=&#34;btn btn-orange btn-block&#34; value=&#34;Sign In&#34; /&gt; &lt;/p&gt; } @*&lt;p id=&#34;nav&#34;&gt; &lt;a class=&#34;pull-left&#34; href=&#34;#&#34; title=&#34;Password Lost and Found&#34;&gt;Forgot password?&lt;/a&gt; &lt;a class=&#34;pull-right&#34; href=&#34;ui-register.html&#34; title=&#34;Sign Up&#34;&gt;Sign Up&lt;/a&gt; &lt;/p&gt;*@ &lt;/div&gt; &lt;/div&gt;</pre> <p>In Controller</p> <pre class="brush: csharp"> // POST: /Account/Login [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Login(LoginViewModel model, string returnUrl) { try { if (!ModelState.IsValid) return View(model); if (ValidateHuman()) { string loginID = model.LoginID.ToUpper().TrimEnd(); string password = model.Password; string hashedPassword = AccountManager.PassEncrypt(password); HRMSEntities db = new HRMSEntities(); db.Configuration.ValidateOnSaveEnabled = false; db.SaveChanges(); bool userExist = db.LetoUsers.Any(x =&gt; x.Suspend == 0 &amp;&amp; x.Username.ToLower().TrimEnd() == loginID &amp;&amp; x.CompanyId == Utility.CompanyID); if (userExist &amp;&amp; (string.Compare(hashedPassword, db.LetoUsers.First(x =&gt; x.Suspend == 0 &amp;&amp; x.Username.ToLower().TrimEnd() == loginID &amp;&amp; x.CompanyId == Utility.CompanyID).Password.ToString()) == 0)) { // var user = db.LetoUsers.Where(x =&gt; x.Suspend == 0 &amp;&amp; x.Username.ToLower().TrimEnd() == loginID &amp;&amp; x.CompanyId == Utility.CompanyID &amp;&amp; x.Password == hashedPassword).FirstOrDefault(); original var user = db.LetoUsers.Where(x =&gt; x.Suspend == 0 &amp;&amp; x.Username.ToLower().TrimEnd() == loginID &amp;&amp; x.CompanyId == Utility.CompanyID).FirstOrDefault(); var emp = db.Employees.SingleOrDefault(x =&gt; x.Suspend == 0 &amp;&amp; x.Status == 1 &amp;&amp; x.AlternateEmployeeCode == user.EmployeeCode &amp;&amp; x.CompanyId == Utility.CompanyID); //---- Generate Authentication Ticket DateTime cookieIssuedDate = DateTime.UtcNow; LoggedInUser loginUser = new LoggedInUser(); loginUser.EmpID = Convert.ToInt32(emp.EmployeeId); loginUser.UserID = user.LetoUserId; loginUser.UserTypeID = Convert.ToInt32(user.UserTypeId); loginUser.UserName = user.Username; loginUser.EmployeeCode = user.EmployeeCode; loginUser.EmployeeName = emp.FirstName; //FormsAuthentication.SetAuthCookie(user.Username, model.RememberMe); //Session[&#34;UserType&#34;] = Convert.ToInt32(user.UserTypeId); //Session[&#34;UserID&#34;] = user.LetoUserId; //Session[&#34;EmployeeCode&#34;] = user.EmployeeCode; //Session[&#34;UserName&#34;] = user.Username; // Getting New Guid //string guid = Convert.ToString(Guid.NewGuid()); ////Storing new Guid in Session //Session[&#34;AuthenticationToken&#34;] = guid; ////Adding Cookie in Browser //Response.Cookies.Add(new HttpCookie(&#34;AuthenticationToken&#34;, guid)); string userData = JsonConvert.SerializeObject(loginUser); var ticket = new FormsAuthenticationTicket(0, model.LoginID, cookieIssuedDate, cookieIssuedDate.AddMinutes(30),// (model.RememberMe) ? cookieIssuedDate.AddDays(7) : cookieIssuedDate.AddMinutes(30),//FormsAuthentication.Timeout.TotalMinutes), model.RememberMe, userData, FormsAuthentication.FormsCookiePath); string encryptedCookieContent = FormsAuthentication.Encrypt(ticket); var formsAuthenticationTicketCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedCookieContent) { Domain = FormsAuthentication.CookieDomain, Path = FormsAuthentication.FormsCookiePath, HttpOnly = true, Secure = FormsAuthentication.RequireSSL }; // ---- if remember me is checked then the cookie will expire after 7 days else at end of session if (model.RememberMe) formsAuthenticationTicketCookie.Expires = cookieIssuedDate.AddDays(7); System.Web.HttpContext.Current.Response.Cookies.Add(formsAuthenticationTicketCookie); return RedirectToAction(&#34;UserDashBoard&#34;); } else { TempData[&#34;Error&#34;] = &#34;please enter correct username/password..!!&#34;; } } else { TempData[&#34;Error&#34;] = &#34;Incorrect Captcha..!!&#34;; } } catch (Exception ex) { } // If we got this far, something failed, redisplay form //ModelState.AddModelError(&#34;&#34;, &#34;The user name or password provided is incorrect.&#34;); return View(model); } </pre>https://www.aspforums.net:443/Threads/100245/Why-multiple-RequestVerificationToken-used-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/100245/Why-multiple-RequestVerificationToken-used-in-ASPNet-MVC/Wed, 17 Jan 2018 06:50:27 GMTWhat is use of TextBoxFor in ASP.Net MVC Razor<p>hi sir,</p> <p>i want to know why this code is written in mvc in asp.net</p> <pre class="brush: html">&lt;div class=&#34;col-md-2&#34;&gt; &lt;label&gt;Duration in Min&lt;/label&gt; @Html.TextBoxFor(m =&gt; m.DurationInMinutes, new { id = &#34;txtduration&#34;, @class = &#34;form-control txtOnlyNumber&#34;, maxlength = &#34;30&#34; }) &lt;/div&gt;</pre> <p><strong><em>@Html.TextBoxFor(m =&gt; m.DurationInMinutes,</em></strong>&nbsp;why this is used</p>https://www.aspforums.net:443/Threads/881457/What-is-use-of-TextBoxFor-in-ASPNet-MVC-Razor/https://www.aspforums.net:443/Threads/881457/What-is-use-of-TextBoxFor-in-ASPNet-MVC-Razor/Fri, 26 Oct 2018 05:36:04 GMTWhat is the difference between ViewData ViewBag and TempData in ASP.Net MVC<p>What is the difference between ViewData, ViewBag and TempData?</p>https://www.aspforums.net:443/Threads/214089/What-is-the-difference-between-ViewData-ViewBag-and-TempData-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/214089/What-is-the-difference-between-ViewData-ViewBag-and-TempData-in-ASPNet-MVC/Thu, 22 Sep 2016 01:52:46 GMTWhat is the difference between ASP.Net and MVC<p>Hi! What is the difference between asp.net and mvc. Actually I want to learn asp mvc but I do not know if it has more advantages than asp.net (webform) or not ? Thnk you</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/195155/What-is-the-difference-between-ASPNet-and-MVC/https://www.aspforums.net:443/Threads/195155/What-is-the-difference-between-ASPNet-and-MVC/Wed, 03 Aug 2016 02:51:09 GMTWhat is MVC<p>what is &nbsp;MVC .Why we use MVC.</p> <p>&nbsp;</p> <p>how to use MVC...</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/154551/What-is-MVC/https://www.aspforums.net:443/Threads/154551/What-is-MVC/Tue, 08 Jul 2014 05:24:40 GMTWhat is ASP.Net MVC<p>Anyone can describe about MVC technology which is more important for dot net.</p> <p>what is the MVC in Dot net.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/203145/What-is-ASPNet-MVC/https://www.aspforums.net:443/Threads/203145/What-is-ASPNet-MVC/Tue, 19 Jun 2018 00:58:06 GMTWhat is ASP.Net MVC<p>I want to know what is called ASP.NET MVC</p>https://www.aspforums.net:443/Threads/114135/What-is-ASPNet-MVC/https://www.aspforums.net:443/Threads/114135/What-is-ASPNet-MVC/Sat, 22 Sep 2012 10:20:34 GMTWebcam Error: jQuery(...).webcam is not a function in ASP.Net MVC<h1 class="header"><a title="Capture Image (Photo) from Web Camera (Webcam) in ASP.Net MVC'a" href="https://www.aspsnippets.com/Articles/Capture-Image-Photo-from-Web-Camera-Webcam-in-ASPNet-MVC.aspx">Capture Image (Photo) from Web Camera (Webcam) in ASP.Net MVC</a></h1> <p>First of all, thanks for posting this article.</p> <p>I have downloaded the source code of this article and run that on my localhost, it works fine.</p> <p>Then after, i copied the code and paste that on my project, exactly same, but in my project it is not working. flash popup is not showing.</p> <p>everything works fine except this: this error shows on inspect element(console mode)</p> <p>Uncaught TypeError: jQuery(...).webcam is not a function</p> <p>Please suggest me why ??</p>https://www.aspforums.net:443/Threads/171637/Webcam-Error-jQuerywebcam-is-not-a-function-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/171637/Webcam-Error-jQuerywebcam-is-not-a-function-in-ASPNet-MVC/Thu, 06 Dec 2018 02:01:27 GMTWeb services in mvc<p>Hi,</p> <p>I had done web services successfully in my mvc project.But i don't know how to set access permission for this web service?</p> <p>Thank you.</p>https://www.aspforums.net:443/Threads/619143/Web-services-in-mvc/https://www.aspforums.net:443/Threads/619143/Web-services-in-mvc/Wed, 07 May 2014 03:22:30 GMTWeb API in ASP.Net MVC<p>hi sir/mam</p> <p>i new to web api, i have no idea, how does it work but i need to learn how to write and read in jason format.</p> <p>&nbsp;</p> <p>plz anyone help to learn it faster.</p>https://www.aspforums.net:443/Threads/200615/Web-API-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/200615/Web-API-in-ASPNet-MVC/Sun, 17 Sep 2017 23:54:53 GMTWeb API example in ASP.Net MVC<p>Hi All</p> <p>I'm very new to ASP.net, as well as WebApi's. Ive created my first test WebApi and have used entitiy framework and connected to my SQL database. I build and run the app no problem, but i cant figure out what URL to type in to see my data. PLease can someone point me in the right direction, i know it must be a silly question but i'm stumped and have been scratching my head and trying for ages.</p> <p>many thanks</p> <p>A.j</p>https://www.aspforums.net:443/Threads/118109/Web-API-example-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/118109/Web-API-example-in-ASPNet-MVC/Mon, 15 Jan 2018 23:05:02 GMTUpload save and retrieve image from database in ASP.Net MVC<p>how to uplaod and retrieve image from database in mvc mobile using razor?</p> <h1>&nbsp;</h1>https://www.aspforums.net:443/Threads/106325/Upload-save-and-retrieve-image-from-database-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/106325/Upload-save-and-retrieve-image-from-database-in-ASPNet-MVC/Sat, 26 Jan 2013 09:47:13 GMTWeb API 404 Not found error after chaning from HTTP to HTTPS in ASP.Net MVC<p>Hi All,</p> <p>Please help me to resolve this issue.</p> <p>we a have website like <a href="http://abc.com">http://abc.com</a>&nbsp;recently it changed to <a href="https://abc.com">https://abc.com</a>&nbsp;in iis at webserver.</p> <p>&nbsp;</p> <p>Now the problem is website not working properly, web api's not loading(not getting json response) on https&nbsp;</p> <p>it's redirecting 404 not found&nbsp;</p> <p>please help me to this.</p> <p>&nbsp;</p> <p>Thanks in Advance.</p>https://www.aspforums.net:443/Threads/183668/Web-API-404-Not-found-error-after-chaning-from-HTTP-to-HTTPS-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/183668/Web-API-404-Not-found-error-after-chaning-from-HTTP-to-HTTPS-in-ASPNet-MVC/Mon, 28 May 2018 00:35:02 GMTValidate DropDownList using Client Side and Server Side Validation in ASP.Net MVC<p>Hi I am new to Asp.Net MVC&nbsp;</p> <p>How to create a page like this and Validation using both on server side and Client side.</p> <p>And how The dropdown can be retrieved from DB and Similarly how to get all the radio buttons values from the DB.</p> <p>Afteer Entering the details how to store it in the DB.<br />Kindly help on it...</p> <p><img src="https://i.imgur.com/4RdONrU.jpg" alt="" width="468" height="313" /></p>https://www.aspforums.net:443/Threads/456769/Validate-DropDownList-using-Client-Side-and-Server-Side-Validation-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/456769/Validate-DropDownList-using-Client-Side-and-Server-Side-Validation-in-ASPNet-MVC/Fri, 03 Oct 2014 04:27:03 GMTValidate DropDownList in ASP.Net MVC<p>hi,</p> <p>I'm filling my dropdown using viewbag like as under</p> <pre class="brush: csharp">@Html.DropDownList(&#34;ArticleType&#34;, null, &#34;select&#34;, new { @class = &#34;ddl&#34; }) @Html.ValidationMessageFor(model =&gt; model.ArticleType) [Required(ErrorMessage = &#34;Please enter article category&#34;)] [DisplayName(&#34;Category&#34;)] public string ArticleType { get; set; }</pre> <p>But i'm unable to get required feild error message.Is i'm going wrong?</p> <p>Thank you.</p>https://www.aspforums.net:443/Threads/198849/Validate-DropDownList-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/198849/Validate-DropDownList-in-ASPNet-MVC/Wed, 02 Apr 2014 23:44:42 GMTUsing ViewModel over Model in ASP.Net MVC<p>Hi</p> <p>why viewModel is need?</p> <p>we have Model to display&nbsp; data to view in mvc</p> <p>&nbsp;</p> <p>Please Explain&nbsp;</p>https://www.aspforums.net:443/Threads/126418/Using-ViewModel-over-Model-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/126418/Using-ViewModel-over-Model-in-ASPNet-MVC/Fri, 14 Sep 2018 04:39:08 GMTUsing Url.Action method in ASP.Net MVC<h2><em>The resource cannot be found.</em></h2> <p><em>&nbsp;i have controller viewmodel and view</em></p> <p><em>from code in controller when i click the view name and go to view the cshtml file gets opened</em></p> <p><em>but during run time hen i click a link to open the same view file i get the above error</em></p> <p><em>this is the url</em></p> <p><em>whts going wrong </em></p> <pre class="brush: html">&lt;a href=&#34;@Url.Action(&#34;InfoAdd&#34;, &#34;Info&#34;)&#34;&gt;&lt;strong&gt;Add Information&lt;/strong&gt;&lt;/a&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/770932/Using-UrlAction-method-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/770932/Using-UrlAction-method-in-ASPNet-MVC/Fri, 27 Oct 2017 02:11:21 GMTUsing TinyMCE RichTextEditor in ASP.Net MVC Framework<p>hi mudassar,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;am trying to add rich text box in my application using mvc4(razor).&nbsp;it working fine in IE browser . but &nbsp;in firefox and chrome &nbsp;the rich text box is not displaying in place of test box it displaying empty space. could u tell me the how to slove the problem</p> <p>&nbsp;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>https://www.aspforums.net:443/Threads/529762/Using-TinyMCE-RichTextEditor-in-ASPNet-MVC-Framework/https://www.aspforums.net:443/Threads/529762/Using-TinyMCE-RichTextEditor-in-ASPNet-MVC-Framework/Fri, 11 Jan 2013 00:14:33 GMTUse WebGrid control or standard Table in ASP.Net MVC<p>Hi Experts,</p> <p>Can u pls tell me whether it is good to use table or webgrid control to display the list of details in MVC application.. pls provide ur golden answers.. i am waiting..</p> <p>Thanks</p>https://www.aspforums.net:443/Threads/916381/Use-WebGrid-control-or-standard-Table-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/916381/Use-WebGrid-control-or-standard-Table-in-ASPNet-MVC/Thu, 29 Aug 2013 07:16:08 GMTUse of ICollection in ASP.Net MVC<p>What is the use of this line :</p> <blockquote> <p><code>public virtual ICollection&lt;PurchasedItem&gt; PurchasedItems { get; set; }</code></p> </blockquote> <p>How to properly assign my&nbsp;<code>getPur()</code>&nbsp;method to&nbsp;<code>Transaction.PurchasedItems</code>&nbsp;I need a resultset which is a combination of&nbsp;<code>Transaction</code>&nbsp;and&nbsp;<code>PurchasedItems</code></p> <p>I'm looking for the result same like in image. Right now I'm getting the desired result with making a new model which contains all the columns. but is it possible to this without making a new model.</p> <p><img src="https://i.stack.imgur.com/xeH3B.png" alt="" width="1034" height="68" /></p> <p>Kindly guide me to make this compact.</p> <p><strong>Models:</strong> </p> <pre class="brush: csharp"> public class Transaction { public int TransactionId { get; set; } public string Salesman { get; set; } public Nullable&lt;int&gt; SalesmanId { get; set; } public string voucherno { get; set; } public string Progress { get; set; } public int ProgressId { get; set; } public string Status { get; set; } public int StatusId { get; set; } public decimal Net { get; set; } [DataType(DataType.Date)] [DisplayFormat(DataFormatString = &#34;{0:dd/MM/yyyy}&#34;, ApplyFormatInEditMode = true)] public DateTime Date_ { get; set; } [DataType(DataType.Date)] [DisplayFormat(DataFormatString = &#34;{0:dd/MM/yyyy}&#34;, ApplyFormatInEditMode = true)] public Nullable&lt;System.DateTime&gt; Date2_ { get; set; } public string AppointmentRemarks { get; set; } public int CustomerId { get; set; } public virtual ICollection&lt;PurchasedItem&gt; PurchasedItems { get; set; } } public class PurchasedItem { public int CustomerId { get; set; } public int ProgressId { get; set; } public string Product { get; set; } public decimal Qty { get; set; } public decimal Price { get; set; } public decimal Disc { get; set; } public decimal Total { get; set; } public string ProductRemarks { get; set; } }</pre> <p><strong>View Model:</strong></p> <pre class="brush: csharp">public class CustomerViewModel { public Transaction Transaction { get; set; } public IEnumerable&lt;Transaction&gt; Transactions { get; set; } public IEnumerable&lt;PurchasedItem&gt; PurchasedItems { get; set; } public PurchasedItem PurchasedItem { get; set; } }</pre> <p><strong>Controller:</strong></p> <pre class="brush: csharp"> public ActionResult History(int? id) { CustomerViewModel VM = new CustomerViewModel(); VM.Transactions = getTransactions().Where(t =&gt; t.CustomerId == id); VM.Transaction.PurchasedItems = getPur().ToList().Where(t =&gt; t.CustomerId == id).ToList(); return View(VM); } public IEnumerable&lt;PurchasedItem&gt; getPur() { var prod = (from c in db.Customers.Include(c =&gt; c.CUSTOMERTYPE) join ch in db.CUSTOMERHEADs.Include(ch =&gt; ch.CustomerDatas).Include(ch =&gt; ch.Customer).Include(ch =&gt; ch.CustomerProgress).Include(ch =&gt; ch.CustomerStatu) on c.Id equals ch.CustomerId into l2 from ch in l2.DefaultIfEmpty() join sm in db.SalesMen on ch.SalesManId equals sm.MasterId into l1 from sm in l1.DefaultIfEmpty() join cd in db.CustomerDatas on ch.id equals cd.Headid into l3 from cd in l3.DefaultIfEmpty() select new { cid = c.Id, prod = cd.ProductCode, price = cd.Price, qty = cd.Qty, disc = cd.Disc, amount = cd.Amount, remarks = cd.Remarks, progressid = ch.CustomerProgress == null ? 0 : ch.CustomerProgress.Id, }); var details = new List&lt;PurchasedItem&gt;(); foreach (var t in prod) { details.Add(new PurchasedItem() { CustomerId = t.cid, ProgressId = t.progressid, Product = t.prod, Qty = Convert.ToDecimal(t.qty), Price = Convert.ToDecimal(t.price), Disc = Convert.ToDecimal(t.disc), Total = Convert.ToDecimal(t.amount), ProductRemarks = t.remarks, }); } return details; }</pre> <p><strong>View:</strong></p> <pre class="brush: csharp">@model CustomerViewModel &lt;fieldset class=&#34;Block&#34;&gt; &lt;legend&gt;Samples Purchased&lt;/legend&gt; &lt;table class=&#34;Table&#34;&gt; &lt;tr class=&#34;Heading&#34;&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Voucherno &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Date &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Progress &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Salesman &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Sample Name &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Qty &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Price &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Disc &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Total &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Remarks &lt;/span&gt;&lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt;&lt;span&gt;Status &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; @foreach (var i in Model.Transaction.PurchasedItems.Where(t =&gt; t.ProgressId == 2)) { &lt;tr&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; m.Transaction.voucherno) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; m.Transaction.Date_) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; m.Transaction.Progress) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; m.Transaction.Salesman) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.Product) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.Qty) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.Price) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.Disc) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.Total) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; i.ProductRemarks) &lt;/td&gt; &lt;td class=&#34;Cell&#34;&gt; @Html.DisplayFor(m =&gt; m.Transaction.Status) &lt;/td&gt; &lt;/tr&gt; } &lt;/table&gt; &lt;/fieldset&gt;</pre>https://www.aspforums.net:443/Threads/237664/Use-of-ICollection-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/237664/Use-of-ICollection-in-ASPNet-MVC/Wed, 06 Jun 2018 01:39:09 GMTUsing jQuery form validation before Ajax submit in ASP.Net MVC<p>please see this link</p> <p><a href="https://www.aspsnippets.com/Articles/ASPNet-MVC-CRUD-Select-Insert-Edit-Update-and-Delete-in-ASPNet-MVC-Razor.aspx" target="_blank">https://www.aspsnippets.com/Articles/ASPNet-MVC-CRUD-Select-Insert-Edit-Update-and-Delete-in-ASPNet-MVC-Razor.aspx</a></p> <p>the ajax create method is:</p> <p>&nbsp;</p> <pre class="brush: csharp">[HttpPost] public JsonResult InsertCustomer(Customer customer) { using (CustomersEntities entities = new CustomersEntities()) { entities.Customers.Add(customer); entities.SaveChanges(); } return Json(customer); }</pre> <p>&nbsp;</p> <p>and this is jquery.ajax add fuction:</p> <p>&nbsp;&nbsp;</p> <pre class="brush: js">//Add event handler. $(&#34;body&#34;).on(&#34;click&#34;, &#34;#btnAdd&#34;, function () { var txtName = $(&#34;#txtName&#34;); var txtCountry = $(&#34;#txtCountry&#34;); $.ajax({ type: &#34;POST&#34;, url: &#34;/Home/InsertCustomer&#34;, data: &#39;{name: &#34;&#39; + txtName.val() + &#39;&#34;, country: &#34;&#39; + txtCountry.val() + &#39;&#34; }&#39;, contentType: &#34;application/json; charset=utf-8&#34;, dataType: &#34;json&#34;, success: function (r) { var row = $(&#34;#tblCustomers tr:last-child&#34;).clone(true); AppendRow(row, r.CustomerId, r.Name, r.Country); txtName.val(&#34;&#34;); txtCountry.val(&#34;&#34;); } }); });</pre> <p>and in view there's not&nbsp;any</p> <p>&nbsp;</p> <p>how can validate both client side and server side errors and exceptions asp.net mvc way?</p> <p>I mean&nbsp;in a normal form we had:</p> <p><strong>if (ModelState.IsValid)</strong> <strong> {}</strong></p> <p>in action method</p> <p>and using&nbsp;<strong>jquery.validate.unobtrusive.js</strong> we could show validation error in</p> <p><strong>@Html.ValidationSummary</strong></p> <p><strong>@Html.ValidationMessageFor</strong></p> <p>&nbsp;</p> <p>what about $.ajax crud validation?</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/214143/Using-jQuery-form-validation-before-Ajax-submit-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/214143/Using-jQuery-form-validation-before-Ajax-submit-in-ASPNet-MVC/Mon, 23 Oct 2017 23:12:50 GMTUsing Html BeginCollectionItem to insert multiple records in Database in ASP.Net MVC<p>I want to save multiple record for&nbsp;CustomerData model but the&nbsp;data I'm getting on&nbsp;submit is only single record even though I'm using html helper beginCollection.</p> <p><span style="text-decoration: underline;"><strong><img src="https://preview.ibb.co/cwjz3T/1.png" alt="" width="640" height="177" /></strong></span></p> <p><span style="text-decoration: underline;"><strong><img src="https://preview.ibb.co/gtOFco/2.png" alt="" width="640" height="193" /></strong></span></p> <p>Desired functionality is when click submit button both the records will go to controller along with other model details.</p> <p><strong>View:</strong>&nbsp;</p> <pre class="brush: csharp">@using MyModel.Models; @model CustomerViewModel &lt;div&gt; &nbsp;&nbsp;&nbsp; &lt;fieldset&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;legend&gt;Purchased Products Detail&lt;/legend&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&#34;row&#34;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Html.EditorFor(m =&gt; m.Transaction.Net, new { htmlAttributes = new { disabled = &#34;disabled&#34;, id = &#34;NetAmt&#34;, Type = &#34;Text&#34;, placeholder = &#34;Net&#34; } }) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @{ Html.RenderPartial(&#34;_Purchase&#34;);} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&#34;submit&#34; value=&#34;Save&#34; /&gt; &nbsp;&nbsp;&nbsp; &lt;/fieldset&gt; &lt;/div&gt; </pre> <p>&nbsp;<span style="text-decoration: underline;"><strong>Partial View:</strong></span>&nbsp;</p> <pre class="brush: csharp">@using HtmlHelpers.BeginCollectionItem; @using SerbaantikCRM.Models; @model CustomerViewModel @using (Html.BeginCollectionItem("Product")) { &lt;div id="ProData"&gt; &nbsp;&lt;div id="RowData" class="Row"&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.Product, new { htmlAttributes = new { id = "PCode", Type = "Text", placeholder = "ProductName" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.Qty, new { htmlAttributes = new { @class = "Qty", id = "Qty", Type = "Text", placeholder = "Qty" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.Price, new { htmlAttributes = new { @class = "Price", id = "Price", Type = "Text", placeholder = "Price" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.Disc, new { htmlAttributes = new { @class = "Disc", id = "Disc", Type = "Text", placeholder = "Discount" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.Total, new { htmlAttributes = new { @class = "TotalAmount", disabled = "disabled", id = "TotalAmount", Type = "Text", placeholder = "Total Amount" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;@Html.EditorFor(m =&gt; m.PurchasedItem.ProductRemarks, new { htmlAttributes = new { @class = "Repeat", placeholder = "Remarks" } }) &nbsp;&lt;/div&gt; &nbsp;&lt;div class="Cell"&gt; &nbsp;&lt;a id="addRow"&gt;&lt;i style="color:green;vertical-align:middle;padding:10px;font-size: 32px" class="fa fa-plus-square"&gt;&lt;/i&gt;&lt;/a&gt; &nbsp;&lt;/div&gt; &nbsp;&lt;/div&gt; &nbsp;&lt;/div&gt; } @Scripts.Render("~/wwwroot/js/customer.js") @Scripts.Render("~/wwwroot/lib/jquery/dist/jquery.min.js") &lt;script&gt; &nbsp;$('#addRow').on('click', function () { &nbsp;$('#ProData').append('&lt;div id="RowData" class="Row"&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.Product, new { htmlAttributes = new { id = "PCode", Type = "Text", placeholder = "ProductName" } })&lt;/div&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.Qty, new { htmlAttributes = new { @class = "Qty", id = "Qty", Type = "Text", placeholder = "Qty" } })&lt;/div&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.Price, new { htmlAttributes = new { @class = "Price", id = "Price", Type = "Text", placeholder = "Price" } })&lt;/div&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.Disc, new { htmlAttributes = new { @class = "Disc", id = "Disc", Type = "Text", placeholder = "Discount" } })&lt;/div&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.Total, new { htmlAttributes = new { @class = "TotalAmount", disabled = "disabled", id = "TotalAmount", Type = "Text", placeholder = "Total Amount" } })&lt;/div&gt;&lt;div class="Cell"&gt;@Html.EditorFor(m =&gt; m.PurchasedItem.ProductRemarks, new { htmlAttributes = new { @class = "Repeat", placeholder = "Remarks" } })&lt;/div&gt;&lt;a id="deleteRow"&gt;&lt;i style="vertical-align:middle;padding:10px;font-size: 32px" class="fa fa-minus-square"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt; '); &nbsp;return false; //prevent form submission &nbsp;}); &lt;/script&gt; </pre> <div id="ProData"> <div id="RowData" class="Row"> <div class="Cell"><strong>&nbsp;ViewModel:</strong></div> </div> </div> <pre class="brush: csharp">using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MyModel.Models { &nbsp;&nbsp;&nbsp; public class CustomerViewModel &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public CustomerModel CustomerModel { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Transaction Transaction { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //public IEnumerable PurchasedItems { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public PurchasedItem PurchasedItem { get; set; } &nbsp;&nbsp;&nbsp; } }</pre> <p><strong>Models:</strong>&nbsp;</p> <pre class="brush: csharp">using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace MyModel.Models { &nbsp;&nbsp;&nbsp; public class CustomerModel &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int Id { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Required(ErrorMessage = "Contact Name required!", AllowEmptyStrings = false)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Name { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Required(ErrorMessage = "Company Name required!", AllowEmptyStrings = false)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Company { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Email { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Address { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Required(ErrorMessage = "Contact Number required!", AllowEmptyStrings = false)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Mb1 { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Mb2 { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Telp1 { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Nullable FocusCode { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Nullable Date_ { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Remarks { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Required(ErrorMessage = "Contact Origin required!", AllowEmptyStrings = false)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Origin { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Type_ { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Nullable TypeId_ { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Fax { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Required(ErrorMessage = "Allotment of Sales Person is required!", AllowEmptyStrings = false)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Salesman { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int SalesManId { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public virtual Transaction[] Transactions { get; set; } &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; public class Transaction &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int TransactionId { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string TranSalesName { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Nullable TranSalesMan { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string voucherno { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Progress { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int ProgressId { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Status { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int StatusId { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public decimal Net { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [DataType(DataType.Date)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Nullable NextAppointmentDate { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [DataType(DataType.Date)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public DateTime Date_ { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string AppointmentRemarks { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public int CustomerId { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public virtual PurchasedItem[] PurchasedItems { get; set; } &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; public class PurchasedItem &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Product { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public decimal Qty { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public decimal Price { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public decimal Disc { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public decimal Total { get; set; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string ProductRemarks { get; set; } &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; }</pre> <p>Kindly help me out of this problem.</p>https://www.aspforums.net:443/Threads/128602/Using-Html-BeginCollectionItem-to-insert-multiple-records-in-Database-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/128602/Using-Html-BeginCollectionItem-to-insert-multiple-records-in-Database-in-ASPNet-MVC/Tue, 05 Jun 2018 01:17:18 GMTUsing EmguCV in ASP.Net MVC<p>I want to make a MVC project.In this project i will want to use face recognition authentication system. Now how i will open a webcam by Emgu CV and detect a face using Emgu CV and save the detected face in database. I do not want to use javascript. Whole process i want to do by Emgu CV. How i will do? Please give me a instruction . Thank you.</p>https://www.aspforums.net:443/Threads/450042/Using-EmguCV-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/450042/Using-EmguCV-in-ASPNet-MVC/Thu, 31 Aug 2017 07:47:23 GMTUsing Bundles (ScriptBundle and StyleBundle) in ASP.Net MVC Razor<p>Hello</p> <p style="padding-left: 30px;">Please Guide me about How to use Bundle Config File in asp.net webform please be Demo of Script and Css both file included in this demo i will much try about that but&nbsp; css file not applied so please provide me solution step by step as soon as possible</p> <p style="padding-left: 30px;">Thanks.</p> <p style="padding-left: 30px;">&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/520495/Using-Bundles-ScriptBundle-and-StyleBundle-in-ASPNet-MVC-Razor/https://www.aspforums.net:443/Threads/520495/Using-Bundles-ScriptBundle-and-StyleBundle-in-ASPNet-MVC-Razor/Sun, 30 Sep 2018 23:46:31 GMTUser Registration and login with phone number instead email address in ASP.Net MVC 4 Razor<p>How to do registration based on phone number and sign in with phone number ,upto now i did using with email id now i need to change the functionality ,like face book i have to register with phone number then i need send confirmation code to email after i need to sign in based on phone number how to do this in mvc4 razor?</p>https://www.aspforums.net:443/Threads/105407/User-Registration-and-login-with-phone-number-instead-email-address-in-ASPNet-MVC-4-Razor/https://www.aspforums.net:443/Threads/105407/User-Registration-and-login-with-phone-number-instead-email-address-in-ASPNet-MVC-4-Razor/Thu, 05 Sep 2013 04:57:59 GMTuse mvc for checked chekbox record insert<p>when i click on button below the grid then selected checkbox&nbsp; records in grid&nbsp; inserted in database</p> <p>using edmx and mvc2</p> <pre class="brush: xml">&lt;%@ Page Title=&#34;&#34; Language=&#34;C#&#34; MasterPageFile=&#34;~/Views/Shared/Site.Master&#34; Inherits=&#34;System.Web.Mvc.ViewPage&lt;IEnumerable&lt;MvcApplication1.Models.Employee&gt;&gt;&#34; %&gt; &lt;asp:Content ID=&#34;Content1&#34; ContentPlaceHolderID=&#34;TitleContent&#34; runat=&#34;server&#34;&gt; Index &lt;/asp:Content&gt; &lt;asp:Content ID=&#34;Content2&#34; ContentPlaceHolderID=&#34;MainContent&#34; runat=&#34;server&#34;&gt; &lt;h2&gt; Index&lt;/h2&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt; &lt;/th&gt; &lt;th&gt; FirstName &lt;/th&gt; &lt;th&gt; LastName &lt;/th&gt; &lt;th&gt; ID &lt;/th&gt; &lt;th&gt; Designation &lt;/th&gt; &lt;th&gt; cheked &lt;/th&gt; &lt;/tr&gt; &lt;% foreach (var item in Model) { %&gt; &lt;tr&gt; &lt;td&gt; &lt;%: Html.ActionLink(&#34;Edit&#34;, &#34;Edit&#34;, new { id=item.ID }) %&gt; | &lt;%: Html.ActionLink(&#34;Details&#34;, &#34;Details&#34;, new { id=item.ID })%&gt; | &lt;%: Html.ActionLink(&#34;Delete&#34;, &#34;Delete&#34;, new { id=item.ID })%&gt; &lt;/td&gt; &lt;td&gt; &lt;%: item.FirstName %&gt; &lt;/td&gt; &lt;td&gt; &lt;%: item.LastName %&gt; &lt;/td&gt; &lt;td&gt; &lt;%: item.ID %&gt; &lt;/td&gt; &lt;td&gt; &lt;%: item.Designation %&gt; &lt;/td&gt; &lt;td&gt; &lt;input type=&#34;checkbox&#34; name=&#34;ContentTypeFilter&#34; value=&#34;@rowContent[0]&#34; /&gt; &lt;%: Html.CheckBox(&#34;Check&#34;,false,new {id=item.ID}) %&gt; &lt;/td&gt; &lt;/tr&gt; &lt;% } %&gt; &lt;/table&gt; &lt;p&gt; &lt;input type=&#34;submit&#34; name=&#34;submit&#34; value=&#34;submit&#34; /&gt; &lt;/p&gt; &lt;p&gt; &lt;%: Html.ActionLink(&#34;Create New&#34;, &#34;Create&#34;) %&gt; &lt;/p&gt; &lt;/asp:Content&gt; </pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/208480/use-mvc-for-checked-chekbox-record-insert/https://www.aspforums.net:443/Threads/208480/use-mvc-for-checked-chekbox-record-insert/Tue, 14 Jan 2014 03:04:01 GMTUse HTML Editor in ASP.Net MVC<p>I want html editor in asp.net view page,I dont kno how to implement..</p> <p>&nbsp;</p> <p>Please tell stepwise and all the plugins that will be required</p> <p>&nbsp;</p> <p>Thanks in advance</p>https://www.aspforums.net:443/Threads/484068/Use-HTML-Editor-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/484068/Use-HTML-Editor-in-ASPNet-MVC/Mon, 13 Jul 2015 05:34:57 GMTUrl Routing not working in ASP.Net MVC 3 Razor<p>&nbsp;</p> <p><strong>when i use route link @html.routelink("Another page" ,"old")</strong></p> <p><strong>is not redirecting to another page its redirecting to default page</strong></p> <p><strong>please answer this question</strong></p> <pre class="brush: csharp">routes.MapRoute(&#34;new&#34;, &#34;{controller}/{action}/{id}&#34;, // URL with parameters new { controller = &#34;Default1&#34;, action = &#34;Index&#34;, id = UrlParameter.Optional } // Parameter defaults);routes.MapRoute(&#34;old&#34;, // Route name &#34;{controller}/{action}/{id}&#34;, // URL with parameters new { controller = &#34;Default2&#34;, action = &#34;Index&#34;, id = UrlParameter.Optional } // Parameter defaults);</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/181416/Url-Routing-not-working-in-ASPNet-MVC-3-Razor/https://www.aspforums.net:443/Threads/181416/Url-Routing-not-working-in-ASPNet-MVC-3-Razor/Tue, 17 Dec 2013 06:48:07 GMTURL Routing in ASP.Net MVC<p>Dear sir/madam</p> <p>i want to add page title in the url so that when user share the page then the title will be shown in url.</p>https://www.aspforums.net:443/Threads/195335/URL-Routing-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/195335/URL-Routing-in-ASPNet-MVC/Thu, 11 Jan 2018 03:37:15 GMT