Posts

Showing posts from March, 2009

Gmail like always visible Progress Indicator using ASP.Net, AJAX UpdateProgress & AlwaysVisibleControlExtender

In complex web applications showing progress indicator while postbacks are in progress, enhances the user experience by providing feedback about the process happening in the background. Gmail has this “loading ….” Progress indicator while they are fetching the mail from their servers or any lenghty server calls are being made. Achieving something similar is a piece of cake using ASP.Net AJAX by using UpdatePanel, UpdateProgress & AlwaysVisibleControlExtender. Set AlwaysVisibleControlExtender’s target control id to the “UpdateProgress” control’s ID & add the progress indicator image inside the “ProgressTemplate” of the “UpdatProgress” control. DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title > GMail like always visible progress indicator title >

Adding Meta tags to Content pages having a common Master page in ASP.Net 2.0 || Setting Meta tags programatically on an ASP.Net page

The problem: ASP.Net 2.0 introduced master pages which promotes HTML Markup re usability among several Content pages. While working with Content pages I found that you cannot set the Meta tags for the page from the HTML markup. I did some research and found the following solution of setting the meta tags of a page programatically. I hope the solution will be helpful to developers struggling to set Meta tags for content pages and people trying to perform SEO on content pages that use a master page. The solution: As shown below, add the following code inside the Page_Load method of the content page. Please set the Title, Meta Description and Meta Keywords tags to the appropriate .Net string values of your preference. protected void Page_Load( object sender, EventArgs e) { if (!IsPostBack) { //Adding Meta tags to the Content Page ASP.Net 2.0 HtmlHead header = ( HtmlHead )Page.Header;