Warning: strstr() expects parameter 1 to be string, array given in /f2/f9blog/public/wp-content/plugins/autoblogged/ab-functions.php on line 49
view - F9 Group Marketing and Technology Blog

F9 Group Marketing and Technology Blog

Marketing, Technology, and current news at http://www.f9group.com/

Entries Tagged ‘view’

Displaying a Paged Grid of Data in ASP.NET MVC

This article demonstrates how to display a paged grid of data in an ASP.NET MVC application and builds upon the work done in two earlier articles: Displaying a Grid of Data in ASP.NET MVC and Sorting a Grid of Data in ASP.NET MVC . Displaying a Grid of Data in ASP.NET MVC started with creating a new ASP.NET MVC application in Visual Studio, then added the Northwind database to the project and showed how to use Microsoft’s Linq-to-SQL tool to access data from the database. The article then looked at creating a Controller and View for displaying a list of product information (the Model). Sorting a Grid of Data in ASP.NET MVC enhanced the application by adding a view-specific Model ( ProductGridModel ) that provided the View with the sorted collection of products to display along with sort-related information, such as the name of the database column the products were sorted by and whether the products were sorted in ascending or descending order. The Sorting a Grid of Data in ASP.NET MVC article also walked through creating a partial view to render the grid’s header row so that each column header was a link that, when clicked, sorted the grid by that column. In this article we enhance the view-specific Model ( ProductGridModel ) to include paging-related information to include the current page being viewed, how many records to show per page, and how many total records are being paged through. Next, we create an action in the Controller that efficiently retrieves the appropriate subset of records to display and then complete the exercise by building a View that displays the subset of records and includes a paging interface that allows the user to step to the next or previous page, or to jump to a particular page number, we create and use a partial view that displays a numeric paging interface Like with its predecessors, this article offers step-by-step instructions and includes a complete, working demo available for download at the end of the article. Read on to learn more! Read More >

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Determine Your ASP.NET Page’s View State Size

The ASP.NET WebForms model aims to simplify web development by blurring the line between the client and the server. In short, WebForms allow the page developer to set aside the fact that the browser and the web server are temporally, physically, and logically disconnected. The page developer can create server-side event handlers that execute in response to a client-side action (like clicking a button). He can make server-side changes to properties of Web controls on the page and need not worry about reinstating those properties on the subsequent postback. One of the essential ingredients for performing this magic is view state . View state represents the state of an ASP.NET web page that is to be remembered across postbacks. On each page visit, an ASP.NET web page automatically constructs this state information and stores it to a hidden form field on the page named __VIEWSTATE . When the form is submitted, the browser returns this hidden form field to the server; the ASP.NET page then parses the view state information to reconstruct the state from the previous page visit. This entire process happens automatically behind the scenes and is, in part, what makes ASP.NET web development so accessible

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz