In my application I am calling an action method from JavaScript & expecting result as JSON. This is pretty simple in ASP.NET MVC, Once we get response object in action method we can call Json() method pass response object as a parameter, then it will transform your response object as JSON & return it as…
TIPS & TRICKS
Friends, We are excited to celebrate 1st Anniversary of our site DailyDotnetTips today. It aims to share useful programming tips for .net developers.This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. Here is some of the statistics : Founded…
This articles talks about one simple technique that is when we make request for any resource/data in in server to ASP.NET MVC Web Application, the request is first processed by a method that is action method. Any public & non static method in a controller class is an action method. Every action method inside the…
Controller in ASP.NET MVC 2 (MVC 3 also) supports property named ViewData. ViewData help us to pass data from controllers to views , in between views using using a late-bound dictionary API. ViewData is property of type ViewDataDictionary in ControllerBase class. ViewData properties are stored as name/value pairs in the ViewData dictionary.
Whenever we submit HTML or JavaScript as input in ASP.NET MVC application we get an exception like “A potentially dangerous Request.Form value was detected from the client (……)”. Because ASP.NET MVC has built-in request validation that helps you automatically protect against cross-site scripting (XSS) attacks and HTML injection attacks, it will prevent the user from…
When I was searching about reporting solutions, found an interesting answer from stackoverflow.com , It explains different enterprise reporting solutions available in market, pro & cons of each reporting solution.
How to manage the controller’s session state? Simply we can decorate the controller class with ‘SessionState’ attribute. [SessionState()] attribute accepts SessionStateBehaviour enumeration. SessionStateBehaviour enumeration has the following constants:
ASP.NET MVC provides many built-in HTML Helpers. With help of HTML Helpers we can reduce the amount of typing of HTML tags for creating a HTML page. For example we use Html.TextBox() helper method it generates html input textbox. Write the following code snippet in MVC View:
Hi Everyone, Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. Lets put a few frequently interesting tips which we have already published over…
We all have this question in our mind. “Why does my application break when we change the Operating Systems?” Typically, whenever a new OS is released, Microsoft makes every effort to ensure application Compatibility. Unfortunately, as the OS evolves and when reliability, security and performance improvements are made, there are some comprises which are made…