.NET news » Search results
Search results for query "net" (410):
Single Sign On (SSO) for cross-domain Asp.net applications, Part-II - The implementation
XML Serialization of Generic Dictionary, Multidimensional Array, and Inherited Type, with sharpSerializer .NET
ASP.NET e-Commerce GridView with Product Comparisons
Embedded Programming: Connected Devices Using the .NET Micro Framework
Cutting Edge: Action Filters in ASP.NET MVC
Create ZIP Files From An ASP.NET Application
A ZIP file is a popular, decades-old file format used for file compression and archiving. Commonly,
such files have a .zip extension and are used to reduce the size of one or more files and/or to archive multiple files and folders into a single file.
Additionally, the contents of a ZIP file can optionally be encrypted and viewable only by those who know the password. Both Microsoft's Windows and Apple's Mac OS
provide built-in operating system support for opening, reading, and creating ZIP files.
In a recent project I needed to create ZIP files from an ASP.NET application on the fly. Specifically, there was a web page that listed of series of data files that were created by an external process. Users visiting this page select a file to download, which then displays a dialog box in their browser, allowing them to open the file or save it to their hard drive. This user interface worked for most of our users, as they were only interested in downloading one or two files at most. However, some of our users needed to download upwards of 20 files. For them, clicking a download link, saving it to their hard drive, and repeating, 20 times, was frustrating and time consuming. To improve this user interface we created the notion of "download profiles," which allow users to associate a name - like "Accounting Files" - with a collection of file types that are available for download. After creating a "download profile," a user could then choose to download all available files that belong to that profile. This would create a ZIP file with the appropriate files and display a dialog box in the user's browser, allowing them to open or save the ZIP. With this enhancement, our power users can now download their 20 files with one mouse click.
This article starts with a look at different ways to create ZIP files in an ASP.NET application, but then focuses on using the free and open-source DotNetZip library.
Enhanced Validation and Extending ASP .NET forms.
Creating ASP.NET Weather User Control
Using Microsoft's Chart Controls In An ASP.NET Application: Using the Chart Controls with ASP.NET MVC
The Microsoft Chart controls are a series of classes in the System.Web.UI.DataVisualization.Charting
namespace that allow web developers to ability to add charts to their ASP.NET applications. The most pertinent charting-related class is the
Chart class, which contains information about
the chart's appearance, series, charting areas, and so forth. In most of the demos and code samples we've explored thus far, we've used the Chart class
as a Web control, adding the <asp:Chart> declarative markup to our ASP.NET page, setting a few properties and, occasionally, writing a few lines
of code. When used as a Web control, the Chart class both creates the chart (as an image) and then renders an <img> element that points
to the generated chart image.
Using the Chart Web control is a standard practice in a WebForms application, but it is not suggested when building an
ASP.NET MVC application. (While it is possible to add Web controls - including the Chat Web control - to the views of an
ASP.NET MVC application, it is generally frowned upon.) So, if we can't use the Chart Web control in an ASP.NET MVC application, how do we display a chart?
In addition to being used as a Web control, the Chart class can also be used programmatically. It is quite possible to create a new Chart object,
set some properties, plot the data points, and then generate the chart image. In fact, we looked at using this technique in an earlier installment,
Programmatically Generating Chart Images, in which we saw (among other things) how to generate chart
images programmatically and add them as attachments in an email message.
This article explores how to display charts in an ASP.NET MVC application.
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.
Unfortunately, there is no such thing as a free lunch, and view state is no exception. The presence of view state adds to the size of the page, thereby resulting in larger page sizes that can negatively effect the user experience. What's more, certain controls - such as DropDownLists and GridViews - can significantly add to the heft of a page's view state. It's a good practice for WebForm developers to keep an eye on their pages' view state sizes to ensure an optimal user experience. This article two ways to programmatically determine a page's view state size and to provide a warning should the view state size exceed some specified threshold.


Syndicate