.NET news » Search results
Search results for query "data" (259):
How to Display ASP.NET DataGrid Data in Excel
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!
Everyday Use of Generics
If you ever use arrays or ArrayLists in your applications, consider using the built-in generics collections instead. The built-in generics collections are not only easier to use than arrays, but they allow you to limit the data type of the items that are in the collection. This provides type-safety, meaning that a compile-time error is generated if the code attempts to put something in the collection that is not of the correct type. It can also improve the performance of the application, limiting conversion of data types...
Data and Command Bindings for Silverlight MVVM Applications
Sync Your Database to SharePoint Using SSIS
Luna Data Layer Code Generator for VB.NET
Data Export from Database to Excel, PDF and Word for .NET without Automation and Acrobat Reader
Accessing and Updating Data in ASP.NET 2.0: Using Optimistic Concurrency
Because multiple users can visit the same web page concurrently, it is possible for a user visiting a data modification page to inadvertently overwrite the modifications made by another user. Consider a page with an editable GridView. If two users visit this page simultaneously from different computers and both edit the same row, whomever saves the first will have her changes overwritten by whomever saves the row last. This type of behavior is known as "last write wins" and is the default behavior for web applications..
Sorting a Grid of Data in ASP.NET MVC
Last week's article, Displaying a Grid of Data in ASP.NET MVC, showed, step-by-step, how to display a grid of data in an ASP.NET MVC application. Last week's article 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).
This article builds on the demo application created in Displaying a Grid of Data in ASP.NET MVC, enhancing the grid to include bi-directional sorting. If you come from an ASP.NET WebForms background, you know that the GridView control makes implementing sorting as easy as ticking a checkbox. Unfortunately, implementing sorting in ASP.NET MVC involves a bit more work than simply checking a checkbox, but the quantity of work isn't significantly greater and with ASP.NET MVC we have more control over the grid and sorting interface's layout and markup, as well as the mechanism through which sorting is implemented. With the GridView control, sorting is handled through form postbacks with the sorting parameters - what column to sort by and whether to sort in ascending or descending order - being submitted as hidden form fields. In this article we'll use querystring parameters to indicate the sorting parameters, which means a particular sort order can be indexed by search engines, bookmarked, emailed to a colleague, and so on - things that are not possible with the GridView's built-in sorting capabilities.
Like with its predecessor, 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!
Common Table Expressions (CTE) in SQL Server 2005
Products, Customers, Orders, OrderDetails, and so on - but we may need to
run reports on a particular subset of the data or against aggregate data across these tables. Or the reporting queries we need
might need to group or filter by results returned by scalar subqueries. Typically, views are used to break down complex queries into digestible chunks or to provide scalar subquery results that can be grouped and filtered.
Views, however, are sometimes overkill, as they are permanent objects at the system-level. If we only need to reference
this complex query in a single stored procedure or UDF, another option is to use a derived
table. Unfortunately, derived tables muddle the readability of the query and must be repeated for each use in a statement..


Syndicate