Posted by Ramani Sandeep on March 23, 2010
This article describes how to use jqGrid’s search toolbar with multiple filters in ASP.NET MVC.
Very often, we have a requirement to display data in tabular form and manipulate it. In classic ASP.NET, built-in controls are available. It’s always better to use custom scripts to solve this problem in ASP.NET MVC. jqGrid is one of such solutions.
jqGrid is a plugin for jQuery, which allows you to display data in tabular form with greater functionality. Its features include:
- Supports tables within tables
- Supports data editing
- Supports tree-like structure to display data
- Supports themes on the jQuery UI
- Records searching, filtering of each column, sorting by columns, page navigation, etc.
You can read full article with example here.
Hope this will help !
Posted in ASP.NET MVC, JQuery | Tagged: jqGrid, Using jqGrid’s search toolbar with multiple filters in ASP.NET MVC | 4 Comments »
Posted by Ramani Sandeep on December 18, 2009
In this two-part series, you will learn how to a typical front end of an e-commerce system using the great Microsoft ASP.NET MVC 1.0 framework.
In the first part, we will focus upon the following points:
- system design
- functionality design
- architecture design and
- database design etc…
In the second part, we will discuss the detailed coding related things.
With the rapid development of Internet, online book sales, as a typical example of the development of Web e-commerce systems, have been deeply mixed up with people’s daily life. Staying at home, people can choose to buy their own favorite variety of books, which greatly shortens the buying time and improves efficiency. Across time and spatial constraints to business circulation, online book sales system has not only brought great changes in commercial circulation, but also brought conveniences to consumers.
Based on the famous MVC design pattern, Microsoft ASP.NET MVC provides a design framework and technical foundation for creating web applications under the .NET platform. It is a lightweight, highly testable framework, which combines the existing excellent ASP.NET characteristics (such as the Master pages, etc.).
It is worth noting that ASP.NET MVC framework has greatly simplified the complex part of programming inside the ASP.NET Web forms solution; and, at the same time, whether the strength or flexibility are concerned, they are not inferior to the latter at all.
In this two-part series, we will construct a client side of an online book sales system using the ASP.NET MVC framework.
Posted in ASP.NET MVC | Tagged: asp.net mvc ecommerce, asp.net mvc framework, asp.net mvc tutorial, e-commerce using asp.net mvc | 5 Comments »
Posted by Ramani Sandeep on September 21, 2009
The default max request size is 4MB (4096).
You can change a setting in your web.config to allow larger requests.
Here is the example:
3: <httpRuntime maxRequestLength="4096"/>
This is default setting, we have to change this to the size that you want to allow user to request like 5MB, 6MB…
Hope this will Help !!!
Posted in ASP.NET, ASP.NET Ajax, ASP.NET MVC | Tagged: httpRuntime, Limiting the File Upload Size in ASP.NET, maximum image upload size, Maximum limit for File Upload ASP.NET | 1 Comment »
Posted by Ramani Sandeep on August 27, 2009
A common scenario when building web user interfaces is providing a pageable and sortable grid of data. Even better if it uses AJAX to make it more responsive and snazzy. Since ASP.NET MVC includes jQuery, I figured it’d be fun to use a jQuery plugin for this demo, so I chose jQuery Grid.
After creating a standard ASP.NET MVC project, the first step was to download the plugin and to unzip the contents to my scripts directory per the Installation instructions.
Click here to read more…..
Posted in ASP.NET Ajax, ASP.NET MVC, JQuery | Tagged: Gridview using jQuery, JQuery, MVC, Using jQuery Grid With ASP.NET MVC | 2 Comments »
Posted by Ramani Sandeep on August 26, 2009
The primary difference is that the extension methods defined for IQueryable<T> take Expression objects instead of Functional objects, meaning the delegate it receives is an expression tree instead of a method to invoke.
IEnumerable<T> is great for working with in-memory collections, but IQueryable<T> allows for a remote data source, like a database or web service.
IEnumerable doesn’t have the concept of moving between items, it is a forward only collection. It’s very minimalistic; something that most any data source can provide. Using only this minimal functionality, LINQ can provide all of these great operators.
IQueryable<T> is a very powerful feature that enables a variety of interesting deferred execution scenarios (like paging and composition based queries).
Hope this helps !!!
Reference Links :
Posted in ASP.NET, ASP.NET MVC, Linq | Tagged: IEnumerable, IEnumerable vs IQueryable, IQueryable, IQueryable vs IEnumerable | 2 Comments »
Posted by Ramani Sandeep on August 26, 2009
The challenge of bringing data from efficient storage engines such as SQL Server into object-oriented programming models is hardly a new one. Most developers address this challenge by writing complex data access code to move data between their applications and the database. However, writing such code requires an understanding of the database, so that you can access data either from the raw tables, from views, or from stored procedures.
More often than not, databases are managed by DBAs whose job it is to ensure that the database is available, powerful, efficient, and secure. The means of accomplishing this generally take the data further out of the scope of your own concepts of how your data should be structured in your applications. It requires a solid knowledge of the database schema, table definitions, and stored procedures along with their parameters and results, views, keys, and more, so that you can create your data access code.
Entity-relationship modeling, introduced in the 1970s by Peter Chen, goes a long way toward solving this problem. Using entity-relationship modeling, programmers create a conceptual model of the data and write their data access code against that model, while an additional layer provides a bridge between the entity-relationship model and the actual data store. Most modeling, to date, gets done on a whiteboard.
With the ADO.NET Entity Framework, Microsoft has made entity-relationship modeling executable. They achieved this using a combination of XML schema files, behind the scenes code generation (creating .NET objects), and the ADO.NET Entity Framework APIs. The schema files define a conceptual layer to expose the data store’s (e.g., a SQL Server database) schema, and to create a map between that and your application-level objects. The ADO.NET Entity Framework allows you to write your programs against classes that are generated from this conceptual layer. The Framework then handles all the required translation as you extract data from the database and send it back in.
Figure 1: How the different layers of the Entity Data Model fit into your application.
This article provides an explanation of the basic concepts of ADO.NET Entity Framework, gives you an opportunity to get your hands dirty with code, and provides a glimpse into the possibilities that ADO.NET Entity Framework opens up for developers.
Click to read more…..
Posted in ADO.NET, ASP.NET, ASP.NET MVC | Tagged: ADO.NET Entity Framework, Entity Framework | Leave a Comment »
Posted by Ramani Sandeep on August 26, 2009
Performing manual dependency injection (like we are above) works fine, but does become harder to maintain as the number of dependencies and components in an application increases.
Several dependency injection frameworks exist for .NET that can help provide even more dependency management flexibility.
These frameworks, also sometimes called “Inversion of Control” (IoC) containers, provide mechanisms that enable an additional level of configuration support for specifying and passing dependencies to objects at runtime (most often using constructor injection).
Some of the more popular OSS Dependency Injection / IOC frameworks in .NET include:
ASP.NET MVC exposes extensibility APIs that enable developers to participate in the resolution and instantiation of controllers, and which enables Dependency Injection / IoC frameworks to be cleanly integrated within this process.
Posted in ASP.NET MVC | Tagged: AutoFac, Dependency Injection Frameworks, Ninject, Spring.NET, StructureMap, Windsor | Leave a Comment »
Posted by Ramani Sandeep on August 22, 2009
Here are some points that differentiate ASP.NET Web Forms from ASP.NET MVC:
Webform Uses the ‘Page Controller’ pattern. Each page has a code-behind class that acts as a controller and is responsible for rendering the layout. MVC Uses the ‘Front Controller’ pattern. There is a single central controller for all pages to process web application requests and facilitates a rich routing architecture.
Webform Uses an architecture that combines the Controller (code behind) and the View (.aspx). Thus the Controller has a dependency on the View. Due to this, testing and maintainability becomes an issue. MVC enforces a “separation of concerns”. The Model does not know anything about the View. The View does not know there’s a Controller. This makes MVC applications easier to test and maintain.
In Webform the view is called before the controller, while in MVC Controller renders View based on actions as a result of the User Interactions on the UI.
At Webforms core, you ‘cannot’ test your controller without instantiating a View. There are ways to get around it using tools. While ASP.NET MVC was designed to make test-driven development easier. You ‘can’ test your Controller without instantiating a View and carry out unit-tests without having to run the controllers in an ASP.NET process.
WebForms manage state by using Viewstate and server-based controls. While MVC does not maintain state information by using Viewstate.
WebForms support an event-driven programming style that is like Windows applications and is abstracted from the user. The State management is made transparent by using sessions, Viewstate etc… In the process, the HTML output is not clean making it difficult to manage later. The ViewState also increases your page size. In ASP.NET MVC, the output is clean and you have full control over the rendered HTML. The orientation is towards building standard compliant pages and provides full control over the behavior of an application.
WebForms can drastically reduce time while building up intranet and internet applications that use a lot of controls (drag and drop model). Although this is true for development, a lot of time is spent later to code around limitations. In MVC, You lose the ‘drag and drop’ quick model of building your web applications. The focus is on control over the application behavior and test-driven development. The model is extensible and you do not have to spend time working around limitations.
Relatively simple to learn and pickup. Works very well for developers who initially have trouble with the HTTP/HTML model and are coming from a similar WinForms oriented event model. In MVC, There is a learning curve to understand the why, when and how of ASP.NET MVC.
Lesser amount of code is required to build Webapps since a lot of components are integrated and provided out of the box. You can also use a lot of data controls provided out of the box that rely on ViewState. In MVC, since the application tasks are separated into different components, amount of code required is more. Since ASP.NET MVC does not use ViewState, you cannot use Data controls like GridView, Repeater.
Webforms works very well for small teams where focus is on rapid application development. MVC works well for large projects where focus in on testability and maintainability.
Reference : here
Posted in ASP.NET MVC | Tagged: MVC vs WebForms, What are the key difference between ASP.NET Webforms & ASP.NET MVC? | 2 Comments »