|
|
Running multiple websites in a single hosting space |
|
Many small companies having limited budget for website hosting prefer to host multiple websites in a single shared hosting space using domain pointers. The shared hosting plans offered by many web hosts use some third party URL rewriting software or IIS URL rewriting module to segregate one website from the other. Often these techniques require that you keep files of individual website into a folder of its own. This approach goes well with websites using totally different codebase. However, if the websites under consideration are using the same codebase this approach may not be suitable. In such cases you need to take control in your own hands by programmatically handling multiple domains and sub domains. This article illustrates one possible approach to do just that. |
|
Posted On : 07 Jan 2012 |
|
|
Creating a Tag Cloud for Your ASP.NET Blog |
|
Most of the blogs display a set of tags or keywords in the form of a Tag Cloud. A tag cloud presents the keywords in font sizes proportional to the number of blog posts having that tag. If you are using some blogging website or using some open source blogging engine you already have a tag cloud ready. However, if you are building your own blog engine or website you will need to build the tag cloud on your own. This article shows how to do just that. |
|
Posted On : 05 Jan 2012 |
|
|
Hide Web Form contents until the page is fully loaded |
|
If your web forms consist of small amount of content they render quickly in the browser and user can start working with them almost immediately. However, when your web forms are bulky and render too much of content, the page is loaded in the browser slowly. Users can start using the partially loaded page and perform actions such as clicking on links or buttons. At times this is undesirable and you want users to wait till the complete page is loaded in the browser. You can accomplish this with the help of little client side script. Let's see how. |
|
Posted On : 04 Jan 2012 |
|
|
Creating a Custom Output Cache Provider in ASP.NET 4 |
|
Output Caching is a very common and popular performance improvement technique for ASP.NET applications. In the previous versions of ASP.NET the output caching mechanism of ASP.NET was rigid in terms of cache store. For example, developers didn't have any flexibility if they wanted to store the output cache in a disk file instead of the server memory. Luckily, ASP.NET 4 provides such flexibility to developers. ASP.NET 4 follows a provider model for output caching. This means you can now define a custom cache provider and plug it in using a configuration file. This article illustrates how such a custom output cache provider that stores cached output in disk files can be developed. |
|
Posted On : 31 Dec 2011 |
|
|
Implementing Website Pinning in ASP.NET |
|
Internet Explorer 9 introduced a new feature - Pinned Websites - that allows you to create a shortcut to a website on Windows 7 taskbar. A pinned website, however, exposes much more functionality than an ordinary shortcut. Normally to launch a website, the user needs to open a browser instance, type in website URL in the browser address bar and then navigate to the required part of the website. Pinning a website allows the user to launch it much like a desktop application. The user can simply click on the icon of the pinned website or select a specific option from a menu and start working with the website. Since a pinned website is always visible on the taskbar, website pinning also grabs constant user attention. This can result in significant increase in the usage of the website for obvious reasons. No wonder that every ASP.NET developer would like to take advantage of this feature in their websites. To that end this article discusses various steps involved in enabling pinning for your website. It also illustrates creating static and dynamic task entries and discusses a few other scenarios specific to ASP.NET. |
|
Posted On : 15 Dec 2011 |
|
|
Aggregating RSS Feeds |
|
.NET framework provides classes to read and write RSS and ATOM feeds. I already wrote a couple of articles illustrating the use of these classes. These classes reside in System.ServiceModel.Syndication namespace and primarily work with one feed at a time. Sometimes, however, you need to aggregate multiple feeds to create a single feed. The code sample below shows you how to accomplish this in an ASP.NET web form.
|
|
Posted On : 13 Dec 2011 |
|
|
Working with Query Extender control |
|
Many ASP.NET websites allow users to filter data presented to them on the basis of certain conditions. A general approach used in such cases is to re-construct the database query again and again for each such filter parameter. Though this works well as far as end user requirements are concerned, it can make your code a bit tricky and cumbersome to manage. This is because you need to manipulate the WHERE parameters of the data source control under consideration (LINQ Data Source for example) in your source code. That is where the Query Extender control comes handy.
The ASP.NET Query Extender server control allows you to filter data retrieved from a data source without changing the underlying query. It does so using a declarative syntax without any need to programmatically manipulate query parameters. This article explores the Query Extender control with the help of several examples. |
|
Posted On : 07 Jul 2011 |
|
|
Working with URL Routing in ASP.NET Web Forms |
|
While developing web sites, at times you require that the URLs being used are not mapped to any physical file. For example, you might be building a blog engine that stores all blog posts in a SQL Server database but while displaying these posts you want URLs to be SEO friendly. In such cases the resource pointed to by the URL has no physical existence. That's where the URL Routing features of ASP.NET come to the rescue. In addition to creating SEO friendly URLs these features also help you render easy to remember URLs. ASP.NET MVC relies heavily on the URL Routing feature. However, it is also possible to use URL Routing in web forms. In this tutorial you will learn just that. |
|
Posted On : 07 Jul 2011 |
|
|
Create a Custom Control to Wrap the Google JSON/ATOM Custom Search API, Part 1 |
|
Google's Custom Search allows you to create custom search engines based on Google's solid foundation of searching capabilities. A Google Custom Search Engine is an easy way to provide a search capability for your websites or blogs. Once created, the custom search engine can be consumed by adding a search box on any of the web pages or by linking to the home page of the custom search engine. At times, however, we may need some advanced way to consume our search engine. |
|
Posted On : 20 May 2011 |
|
|
Dynamic data in existing data controls |
|
In a traditional data driven web site, you need to individually create web forms necessary to get the data in and out of the database tables. ASP.NET Dynamic Data features allow you to automate this functionality. ASP.NET Dynamic Data allows you to create extensible data driven web applications with little or no coding from your side. ASP.NET Dynamic Data automatically reads the database schema for you and generates data display and data entry pages on the fly. You can, of course, customize the resultant application if needed. The ASP.NET Dynamic Data Web Site project templates create a base project with necessary web forms and user controls that you can customize to suit your needs. However, in some cases creating a separate project is undesirable and you may want to integrate the Dynamic Data features with an existing web site. In this step-by-step article you will learn how this can be accomplished. |
|
Posted On : 22 Apr 2011 |
|
|