It is a newer version of ASP.NET MVC,ASP.NET MVC 4 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework.
Question:Saved user, password appearing in wrong fields even autocomplete=off is not working in mvc5?
Description:I have a mvc view(page)for verify otp where I have three fields for verification code,password and confirm password but in the code field saved email address is appearing, I have tried using autocomplete=off with no luck
Posted by: Khalid Abbas | Posted on: Aug 26, 2020
Question:how to display/render "@" symbol as string in mvc view as razor syntax uses the @ symbol to transition from HTML to C#?
Description:I am trying to write following code in my MVC View. <script type="application/ld+json"> { "@context" : "http://mywebsite.com", "@type" : "WebSite" } </script> but it is throwing error "The name 'context' does not exist in the current context" as it consider it as C# code.
Posted by: Samantha Jones | Posted on: Jun 27, 2019
Question:add header on every page while dynamically generate pdf from html using iTextSharp in asp.net(C#)?
Description:I have successfully generate the pdf from html using the following Link But now i need to generate header on every page of the dynamically generated pdf,I have seen some example to generate such header footer dynamically but most of the examples are in java, I need such implementation in C#. Thanks in advance
Posted by: Umer khan | Posted on: Sep 13, 2018
Question:How to get image url from a image field in Sitecore 9 at MVC view?
Description:I am using following code chunk which is actually generating complete img tag but I only need image url because I have to set only the url in some CSS property. @foreach (var item in ViewBag.Items) { <li class="slide"> <div class="item featured-item1" style='background-image: url(@Html.Sitecore().Field("Image", item));'> <div class="content"> <h3>@Html.Sitecore().Field("Title", item)</h3> <div class="buttons-items"> <a href="@Html.Sitecore().Field("BuyNow", item)" class="btn-buy">BUY NOW</a> <a href="@Html.Sitecore().Field("LearnMore", item)" class="btn-more">LEARN MORE</a> </div> </div> </div> </li> } In the above code "ViewBag.Items" contains Sitecore items, and field name is "Image" for which I am trying get the image url.
Posted by: Junaid Aziz | Posted on: Aug 02, 2018
Question:how to implement return url functionality for login page in asp.net mvc 4?
Description:I have a simple application in asp.net mvc 4 with my controller method for login is with attribute [AllowAnonymous] and I want my users to redirect to same page from which they have been redirected to the login page. I have seen some article which suggests that I need to pass the returnurl in the query string but did't get the complete process of implementing the feature. kindly suggests a complete solution!
Posted by: Khalid Abbas | Posted on: Jul 30, 2018
Question:'A potentially dangerous Request.Form value was detected from the client' error in asp.net mvc 4?
Description:Getting the following error in my mvc 4 application after deployment 'A potentially dangerous Request.Form value was detected from the client' on inserting html through my input boxes, i want to allow the html to be inserted.
Posted by: Junaid Aziz | Posted on: Jan 02, 2018