About jeffreydavidsz

jeffreydavidsz has been a member since November 27th 2010, and has created 12 posts from scratch.

jeffreydavidsz's Bio

jeffreydavidsz's Websites

This Author's Website is http://www.lynxdigiservice.nl

jeffreydavidsz's Recent Articles

Custom Validation in ASP .NET MVC 3 using Data Annonations Model Validator

Article by Mayuraegis

Custom Validation in ASP .NET MVC 3 using Data Annonations Model Validator – Computers – Programming

Search by Author, Title or Content

Article ContentAuthor NameArticle Title

Home
Submit Articles
Author Guidelines
Publisher Guidelines
Content Feeds
RSS Feeds
FAQ
Contact Us

This article will demonstrate implementation of custom validation rules in ASP.NET MVC3 for offshore .net developers. MVC3 is an extensible framework that makes .net developers to add user defined specific custom validations with the use of custom data annotations. Considering present outsource .net development scenario the .net developers need to develop an application for Loan processing system.


In your system it will ask the customer to enter his details including Name, Salary etc. If the loan is to be processed then there is a rule that the Salary must be more than or equal to Rs 20000/-. Considering common scenario end-users need to be provided with the feedback details by which en error message would be displayed on the screen if end-user enters below the specified amount.


In case of implementing custom validation and applying it to use Data Annotations your class must inherit from ‘ValidationAttribute’ class. This class is the base class for all standard data annotations types.


The first step would be to open VS2010 and create a new ASP.NET MVC 3 project. .Net developers need to name it as ‘ASPNET_MVC3_Custom_ModelValidation’.
The next step is of adding a new folder in the project and named as ‘CustomizedValidators’. Add a new class file named as “CustomValidator.cs” in this folder. This class contains custom validation class and data annotations class. Dot net developers need to write the below code:

“ValidationAttribute” class inherits the SalaryAttribute class. The SalaryAttribute class overrides the ‘IsValid()’ method of the base class. An object of “ValidationResult” class would be returned by this method. Acontainer for the result of validation reuest is represented by this class and “minSalary” member is validated by the method that currently had implemented it. Here when the salary is entered below the specified amount by the end user he will receive an error message because the ValidationResult class would not return “Success” back to UI.


The ‘SalaryValidator’ class gets inherited from DataAnnotationsModelValidator<T> class while providing with a model validator for the specific type. For defining client validation against the specific field the method “GetClientValidationRules” is used.


The third step would be to addition of a new class file in the Model folder and then name it as ‘ModelClasses.cs’. Add the following model classes in it:

Locate the “salary” property from “Customer” class and the attribute “Salary” would be applied with the defined salary value in the constructor.


The fourth step would be adding CustomerController in the folder Controllers with code as below:

The Create () method with HttpPost attribute is used for defining the logic to create a new customer by making calls to ‘CreateCustomer()’ method of the DataAccess class. With the use of ModelState.IsValid the model state is checked by the logic and it validates if the model state dictionary is valid or not.


Fifth step would be adding Index and creating views with right click on the controller methods like Index and Create. For views as customer select the Model class.
Sixth step would be to make changes like “Layout.cshtml” file in the shared folder: @Html.ActionLink(“Customer”, “Index”, “Customer”)
Seventh step would be to run the application and click on the “Customer” tab and it would be displayed as:

Click on the Create New link and the Create view will be displayed as shown below:


Enter values for CustomerName and City, keep Salary value as default and click on Submit. The result will be as shown below:


We have learnt from this article that for model validations a flexible mechanism is provided by an extensible framework like MVC 3. Benefit of creating a separate validation attributes class is that it can be reused across various models as per needs.

</T>

About the Author

For More Information:- Asp.net development | .Net Developers

Use and distribution of this article is subject to our Publisher Guidelines

whereby the original author’s information and copyright must be included.

Mayuraegis



RSS Feed


Report Article


Publish Article


Print Article


Add to Favorites

Article Directory
About
FAQ
Contact Us
Advanced Search
Privacy Statement
Disclaimer

GoArticles.com

Tekpub – Mastering ASP.NET Ajax Library (2011)

Tekpub - Mastering ASP.NET Ajax Library (2011)

In this series Craig Shoemaker walks through the new ASP.NET Ajax Library. Craig will cover how to use the ScriptLoader, DataView Control, DataContext Control, Observer Framework, and how to work with WCF Data Services. Craig will cover how to use the library in pure HTML or with ASP.NET WebForms or ASP.NET MVC.
Video Rating: 0 / 5

Use Dot Net Frameworks not to Get Lost in the Virtual Reality

Article by Mahendra Sharma

Use Dot Net Frameworks not to Get Lost in the Virtual Reality – Web Development – Programming

Search by Author, Title or Content

Article ContentAuthor NameArticle Title

Home
Submit Articles
Author Guidelines
Publisher Guidelines
Content Feeds
RSS Feeds
FAQ
Contact Us

About

Compare Magento and ASP (Znode)

Article by Jezz

Compare Magento and ASP (Znode) – Internet

Search by Author, Title or Content

Article ContentAuthor NameArticle Title

Home
Submit Articles
Author Guidelines
Publisher Guidelines
Content Feeds
RSS Feeds
FAQ
Contact Us

What is Magento?
Magento is an open-source ecommerce platform which was launched on March 31, 2008. Magento was created by Varien and it is built on Zend Framework. Magento is an Open Source eCommerce Software which is full of features alongwith flexibility.


What is Znode?
Znode Storefront is an ASP.NET 2.0 solution which is specialized in secure, scalable e-commerce solutions driven by customer needs.


Community

Magento is having the largest community for their users. They have a Wiki section and allow the community to contribute.
Since Znode is not an open source like the others, it does not appear to have much of an active community.


User Interface / CSS

Magento provides good user interface as compare to others by utilizing Scriptlicious, AJAX, and tagging it has Web 2.0 written all over it. It comes with a wide array of features “out of the box.”
Znode offers a structured CSS and Master Page system setup which is good for customization. The admin area in Znode allows the users to edit the CSS via a form textbox which is also in WordPress.


Coupon System
Magento providean advanced coupon system. Apart from (%) percentage off or ($ )dollars off coupons, it also allows for conditional based coupons to be created.
Znode Storefront allows for dollars off or percentage off coupons.


SEO- Search Engine Optimization
Metadata – Magento and Znode both allow the editing of website’s metadata.

URL Optimization – As far as SEO is concerned, SEO friendly URLs of website play an important role to increase search engine rankings. This is also an important factor in SEO and in human readability. Magento is more SEO friendly and provides SEO friendly. Here are some sample product URLs of Magento and Znode.


Magento URL
/variety/friendship-flowers/a-best-friend-believes.html
Znode URL
/storeproduct589.aspx


Conclusion:

To conclude, I must say that Magento is preferable over Znode due to various reasons such as SEO friendliness, Open Source Software, attractive user-interface etc. But at the same time I must admit that Magento is a little complex too. For editing a singal file, one needs to go through several files.
You can Hire Magento Developers or any Magento Development Company for magento development. If you incurr some money on hiring these services, it will pay you back for sure.

Znode Storefront

At 500 bucks for the Standard version this is the solution I ended up choosing for the project. I felt the most comfortable (maybe because I was paying for it!) with the software. Here are some key reasons:

I needed the Admin area to be easy enough to teach the client.

The template it comes with is nice enough where not a lot of customization is needed.
The images are automatically resized for the Admin.


Magento Commerce

Magento seems to be very easy to build on. They’ve got a good comunity and lots of documentation already. Although they only have a few payment systems, they got a nice writeup on creating new Payment Modules. Through this process I did the least amount of testing with Magento, so I can’t say too much more about it. This was because it is PHP based and since it isn’t available for production environments yet it wasn’t a likely choice to begin with.


However, I would definitely keep an eye on this going into 2008. It looked pretty enough on the outside to make me consider moving from ASP.NET to PHP for the project. If this project was six months down the road I may have chosen this solution. If I was a competitor I would look at all the things they are doing right and take notes.
About the Author

My name is Jezz. website name is http://www.expertmagentodevelopers.com which provides Magento Development services such as Magento Extensions, Magento Customization, Magento Integration Services.

Use and distribution of this article is subject to our Publisher Guidelines

whereby the original author’s information and copyright must be included.

Jezz



RSS Feed


Report Article


Publish Article


Print Article


Add to Favorites

Article Directory
About
FAQ
Contact Us
Advanced Search
Privacy Statement
Disclaimer

GoArticles.com

Marc Martin Announced as C12 Area Chair for Wisconsin


Greensboro, NC (PRWEB) October 02, 2011

Marc Martin Announced as C12 Area Chair for Wisconsin

The C12 Group announces Marc Martin as the C12 Chair for the Central and Northeastern Wisconsin area. C12 is the US leading provider of Christian roundtables for CEOs and business owners. We are excited to expand C12s presence into Wisconsin. Marc looks forward to building great businesses for a greater purpose, says Don Barefoot, CEO and President of The C12 Group.

The decision to apply my God-given business experience to the role of C12 Chair has been a rewarding one. I look forward to joining with other like-minded Christians to form the first C12 Groups launching in Wisconsin in October, states Martin.

C12 Groups are designed for CEO/Owners who desire to grow their businesses into all they can be in both success and significance. They focus on life-long learning and interaction among business professionals through best practice business and ministry materials that incorporate Biblical principles.

Founded in 1992 by Buck Jacobs, a dedicated Christian, author and CEO, C12 is a growing network of more than 100 groups in 60 metro areas across America. The groups are comprised of Christian CEOs and business owners who seek to grow professionally and spiritually with other like-minded executives.

If you would like more information on Wisconsin C12 groups, please contact Marc Martin at marc(dot)martin(at)c12group(dot)com. Or visit the website at http://www.c12centralwi.com.

The C12 Group