How to generate aspx.designer.cs file in Microsoft Visual Studio?
The quickest way to generate is by Right-clicking on the aspx file, then choose “Convert to web application“ and then, the designer.cs file is regenerated..
View Article301 redirect from http to https with web.config
If you want to apply 301 Permanent Redirect for all your http requests to https requests – You need to add the following section under the system.webserver section of your web.config file:
View ArticleHow to convert JSON object to a Class object in c#
Use JavaScriptSerializer to convert Json object to a C# Class. You need to add System.Web.Extensions to the project if you want to use JavaScriptSerializer For example if you have a Json Customer data...
View ArticleSystem.Web.Mvc.HtmlHelper does not contain a definition for ‘ActionLink’
When trying to use custom @Html.ActionLink in the Razor you might get an error – System.Web.Mvc.HtmlHelper does not contain a definition for ‘ActionLink’. Solution Make sure that you have following...
View ArticleMVC Razor – Displaying html within code blocks
Below are the examples of how to display HTML within code blocks You could use @: to escape: @if(Model.foo) { @:Hello World } or the special tag which is not outputted in the response: @if(Model.foo) {...
View ArticleMVC 4 – Handle 2 Submit buttons in one form
Problem When you want to handle multiple submit buttons in ASP.NET MVC framework. For example @using (Html.BeginForm("Login", "Member")) { <input name="Command" type="submit" value="Login" />...
View ArticleASP.Net 2012 Unobtrusive Validation with jQuery
I was using Visual Studio 2012 and I created an empty ASP.Net Web Application, when I tried to add the traditional validator controls to a new page, this error occurs: WebForms...
View ArticleBest way of validating an email address in ASP.NET
Lot of people use regular expressions to validate the email address entered on the server side. But I recommend using the MailAddress constructor. This is what Microsoft says. Instead of using a...
View ArticleManually parse a SAML (SSO) token
How to manually parse a SAML (Security Assertion Markup Language) token. SAML – is an XML-based, open-standard data format for exchanging authentication and authorization data between parties, in...
View ArticleError during serialization or deserialization using the JSON...
Problem: When I released my application on my live server I got the following error: System.InvalidOperationException– Error during serialization or deserialization using the JSON JavaScriptSerializer....
View Article
More Pages to Explore .....