Posts

Showing posts from March, 2014

Pawan Kalyan’s party details

Image
It is the hottest topic all over the state of Andhrapradesh at both the Seemandhra and Telangana regions that Power star of Tollywood Pawan Kalyan is going to make a bang with his entry into the politics. Few say of his own party and few say he would support any existing party, may it be the Loksatta or the Aam Aadmi Party of Kejriwal. Sources claim that Pawan Kalyan is backed by Ex-Joint Director of CBI Lakshmi Narayana, filmmaker Trivikram Srinivas and Ch Ramoji Rao, the Chairman of Eenadu group in launching his party. He has two names like 'Republican Party' and 'Yuva Rajyam' in his mind for it. Trivikram is said to be looking after all the activities of the party. The actor is expected to announce the name on March 9 or 11. As per the latest information from a few undisclosed sources, Pawan Kalyan is getting ready to enter politics with a bang. His followers will contest nine Lok Sabha and 40 Assembly seats in both Seemandhra and Telangana regions. Great surpris

How to Enable and Disable Client-Side Validation in MVC

MVC3 & MVC4 supports unobtrusive client-side validation. In which validation rules are defined using attributes added to the generated HTML elements. These rules are interpreted by the included JavaScript library and uses the attribute values to configure the jQuery Validation library which does the actual validation work. In this article, I would like to demonstrate various ways for enabling or disabling the client side validation. Enable Client-Side Validation in MVC For enabling client side validation, we required to include the jQuery min, validate & unobtrusive scripts in our view or layout page in the following order. <script src = "@Url.Content(" ~ / Scripts / jquery-1 .6.1. min . js ")" type = "text/javascript" ></script> <script src = "@Url.Content(" ~ / Scripts / jquery . validate . js ")" type = "text/javascript" ></script> <script src = "@Url.Content("

Difference Between Razor View Engine and ASPX View Engine

View Engine is responsible for rendering the view into html form to the browser. By default, Asp.net MVC support Web Form(ASPX) and Razor View Engine. There are many third party view engines (like Spark, Nhaml etc.) that are also available for Asp.net MVC. Now, Asp.net MVC is open source and can work with other third party view engines like Spark, Nhaml. In this article, I would like to expose the difference between Razor & Web Form View Engine. Razor View Engine VS Web Form(ASPX) View Engine Razor View Engine Web Form View Engine Razor Engine is an advanced view engine that was introduced with MVC3. This is not a new language but it is a new markup syntax. Web Form Engine is the default view engine  for the Asp.net MVC that is included with  Asp.net MVC from the beginning. The namespace for Razor Engine is  System.Web.Razor . The namespace for Webform Engine is System.Web.Mvc.WebFormViewEngine . The file extensions used with Razor Engine are different fr

Server Side Model Validation in MVC Razor

Image
Server side validations are required for ensuring that the received data is correct and valid. If the received data is valid then we do the further processing with the data. Server side validations are very important before playing with sensitive information of a user. Server-side validation must be done whether we validate the received data on the client side. User could disable script in his browser or do something else to bypass client-side validation. In this case server-side validation must required to protect our data from dirty input. Server-side model validation technique In MVC Razor, we can validate a model server side by below two ways: Explicit Model Validation Model Validation with Data Annotations Explicit Model Validation Suppose, you want to validate the registration process of a user for which the Registration model and view are defined as below: RegistrationModel.cs public class RegistrationModel { public string UserName { get ; set