.NET news » Search results
Search results for query "MVC" (63):
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.
Implementing the Store Locator Application Using ASP.NET MVC (Part 2)
Last week's article, Implementing the Store Locator Application Using ASP.NET MVC (Part 1), started
a two-part article series that walked through converting my ASP.NET store locator application from
WebForms to ASP.NET MVC. Last week's article stepped through the first tasks in porting the store locator application to ASP.NET MVC, including: creating the new
project; copying over stylesheets, the database, scripts, and other shared content from the WebForms application; building the HomeController; and coding
the Index and StoreLocator actions and views.
Recall that the StoreLocator action and view prompts the user to enter an address for which to find nearby stores. On form submission, the action interfaces
with the Google Maps API's geocoding service to determine if the entered address corresponds to known latitude and
longitude coordinates. If so, the user is redirected to the StoreLocatorResults action (which we create in this article) that displays the nearby stores in
both a grid and as markers on a map. Unlike the StoreLocator action created in Part 1, the StoreLocatorResults action uses a more intricate
model and a strongly-typed view.
Incorporating ASP.NET MVC and SQL Server Reporting Services, Part 1
Your ASP.NET MVC application needs reports. What do you do? In this article, I will demonstrate how simple it is to weave SQL Server Reporting Services (SSRS) into your ASP.NET MVC Applications.Your ASP.NET MVC application needs reports. What do you do? In this article, I will demonstrate how simple it is to weave SQL Server Reporting Services (SSRS) into your ASP.NET MVC Applications.Your ASP.NET MVC application needs reports. What do you do? In this article, I will demonstrate how simple it is to weave SQL Server Reporting Services (SSRS) into your ASP.NET MVC Applications.Your ASP.NET MVC application needs reports. What do you do? In this article, I will demonstrate how simple it is to weave SQL Server Reporting Services (SSRS) into your ASP.NET MVC Applications.
ASP.NET MVC & the ADO.NET Entity Framework
Both ASP.NET MVC and the ADO.NET Entity Framework are both very popular topics right now in the developer community.Having spoken at various user group meeting and code camps it is very obvious to me what topics a lot of developers are interested in. I see that sessions about ASP.NET MVC or the Entity Framework are always packed with developers eager for more information. The focus of this article is the Entity Framework, but in the context of an ASP.NET MVC application. As such, I am assuming at least basic understanding of ASP.NET MVC but little-to-none with Entity Framework.
Implementing the Store Locator Application Using ASP.NET MVC (Part 1)
Back in May 2010 I wrote a three-part article series titled Building a Store Locator ASP.NET Application Using Google Maps API, which showed how to build a simple store locator application using ASP.NET and the Google Maps API. The application consisted of two ASP.NET pages. In the first page, the user was prompted to enter an address, city, or postal code (screen shot). On postback, the user-entered address was fed into the Google Maps API's geocoding service to determine whether the address, as entered, corresponded to known latitude and longitude coordinates. If it did, the user was redirected to the second page with the address information passed through the querystring. This page then queried the database to find nearby stores and listed them in a grid and as markers on a map (screen shot).
Since the WebForms store locator application was published, several readers have emailed me to ask for an ASP.NET MVC version. I recently decided to port the existing WebForms application to ASP.NET MVC. This article, the first in a two-part series, walks through creating the ASP.NET MVC version of the store locator application and pinpoints some of the more interesting and challenging aspects. This article examines creating the ASP.NET MVC application and building the functionality for the user to enter an address from which to find nearby stores. Part 2 will examine how to show a grid and map of the nearby stores.


Syndicate