.NET news » Search results
Search results for query "default.asp" (11):
CODE Framework: Creating Application Themes
In prior articles, I have shown how to create WPF-based client applications using the CODE Framework and the default themes it ships with. This is a great way to create applications quickly yet make them very reusable and maintainable. However, using the default themes is just the tip of the iceberg. CODE Framework’s theming system is completely open and the default options are just that: defaults. And it turns out to be surprisingly straightforward to create your own themes.
Online Article: Get Control and Performance with the Real Time Stylus API
Techniques for Preventing Duplicate URLs in Your Website
Chances are, there are several different URLs that point to the same content on your website. For example, the URLs http://yoursite.com
,
http://yoursite.com/default.aspx
, http://www.yoursite.com
, or http://www.yoursite.com/default.aspx
are all
likely valid URLs that results in the same content, namely the homepage for yoursite.com
. While having four different URLs reference the same content
may not seem like a big deal, it can directly impact your website's search engine placement and, consequently, it's traffic. To a search engine, those four different
URLs represent four different pages, even though the all produce the same content.
To understand how allowing duplicate URLs in your website can affect your search engine placement, first understand that search engines base a page's placement in the
search results based, in part, on how many other websites link to the page. Now, imagine that there are 1,000 web pages from other websites that link
to your homepage. You might conclude, then, that a search engine would rank the importance of your homepage based on those 1,000 links. But consider what would happen
if 25% of those links linked to http://yoursite.com
, 25% to http://yoursite.com/default.aspx
, and so on. Rather than your homepage
reflecting 1,000 inbound links, instead the search engine assumes there are only 250 links to http://yoursite.com
, only 250 links to
http://yoursite.com/default.aspx
, and so on. In effect, redundant URLs can dilute your search engine ranking.
A key tenet of search engine optimization is URL normalization, or URL canonicalization. URL normalization is the process of eliminating duplicate URLs in your website. This article explores four different ways to implement URL normalization in your ASP.NET website.
Custom Paging in ASP.NET 2.0 with SQL Server 2005
AllowPaging
property to True and add a few lines of code in the PageIndexChanged
event handler and you were done! ASP.NET 2.0's
GridView makes
the process even simpler - just check the Enable Paging option from the GridView's smart tag - no code needed.
Of course nothing is free in life, and the tradeoff you make with the ease of checking a checkbox to enable paging (or, in the DataGrid's case, writing a couple lines of code) is performance. Out of the box, the DataGrid and GridView use default paging, which is a simple paging model that returns all of the records for each every page of data shown. When paging through small amounts of data (dozens to a hundred or so records), this inefficiency is likely outweighed by the ease of adding the feature. However, if you want to page through thousands, tens of thousands, or hundreds of thousands of records the default paging model is not viable.
The alternative to default paging is custom paging, in which you are tasked with writing code that intelligently grabs the correct subset of data. It requires a bit more work, but is essential when dealing with sufficiently-sized data...
Gracefully Responding to Unhandled Exceptions - Displaying User-Friendly Error Pages

In .NET applications, an illegal operation - an invalid cast, attempting to reference a null value, trying to connect to a database
that's been taken offline, and so on - raises an exception. Exceptions can be caught and handled directly in code
through the use of Try / Catch blocks. For ASP.NET applications, if the exception is
not handled in code, it bubbles up to the ASP.NET runtime, which raises an HttpUnhandledException
.
By default, unhandled exceptions result in a page that displays the text, "Runtime Error" with instructions for developers on how to display exception details
(see the screen shot to the right). This "Runtime Error" error page is what is seen by external visitors; if you visit your site through
localhost and an unhandled exception occurs, the default error page includes the type and details of the exception thrown.
End users will no doubt find the "Runtime Error" page to be intimidating and confusing - do you think the average computer user knows what "Runtime" means? All the user knows is that something went horribly wrong. They might fear that their data or progress has been lost and that they are responsible for the error. Ironically, the person who does care that an unhandled exception has occurred - the developer - is left out of the loop unless the end user takes the time to email the developer the details of the error (what page it happened on, the steps the user had performed that caused the error, and so on)..
Virtualizing WrapPanel
ASP.NET 2.0 CSS Friendly Control Adapters 1.0 Released!
Cache Integration: Building and Using Custom OutputCache Providers in ASP.NET
Customized Scrolling in Silverlight using Expression Blend
Improving Web Development Using Virtualization
This article looks at Microsoft's free virtualization software, Virtual PC, and shows how to use it to create guest environments where you can cleanly install alternate development environments to assist with web development.