Articles tagged under asp.net

Customise Password Recovery Email

Customise Password Recovery Email The majority of web applications need some sort of authentication component, and ASP.Net's authenication is excellent and allows you all the functionality you would expect. On a recent web application we were required to provide users with the facility

Paul Marshall - 8,599 views

Set Input Focus on a Control Programatically Added to an ASP.Net Page

Set Input Focus on a Control Programatically Added to an ASP.Net Page This little problem had the potential to drive me nuts for hours, I was fortunate to stumble over a blog with 100s of comments re problems of this nature and how to solve it. Most of the discussion was about using JavaScr

Paul Marshall - 3,829 views

Display CreateUserWizard Error Messages using a ContentTempate

CreateUserWizard Error Messages using a ContentTempate In our latest project we are implementing Membership, Roles and Profiles. I've used these before, but never really had the need to exploit all the features. The business requirements of the system have meant that I have had to imp

Paul Marshall - 8,450 views

ASP.NET Framework 1.1 Validation not working in IE7?

ASP.NET Framework 1.1 Validation not working in IE7? I recently had a problem with an old Framework 1.1 website where the form would not post back if the page contained validators (CustomValidators to be exact). It caused me to do a lot of googling and in the end some javascript debugging.

Paul Hayman - 6,621 views

LoginStatus not logging users out?

LoginStatus not logging users out? Have you noticed your LoginStatus control doesn't log the user out when you click Logout? Well, to fix this all you need to do is add an id attribute. This works <asp:LoginStatus runat="server" id="loginstatus1" /> Thi

Paul Hayman - 6,940 views

Using a .Net 2.0 anonymous delegate when generating a thumbnail

Using a .Net 2.0 anonymous delegate when generating a thumbnail Rather than using a mehod which does nothing except return false. Use a .Net 2.0 anonymous delegate for the GetThumbnailImageAbort parameter. delegate() { return false; } Example System

Paul Hayman - 3,171 views

Typed Masterpage reference

Typed Masterpage reference ASP.NET master pages are pretty handy and here is a simple tip to make them even easier to use. Using the MasterType reference in your content page allows you to refer to your master page properties without having to cast it to your master page type everytime.

Dave Howard - 9,671 views

Lightweight Ajax

Lightweight Ajax Ajax doesn't have to be complicated - at its most basic it just means partial updates your pages rather than reloading the whole page. The attached js library contains just two functions - GetContent and RunJS. GetContent() takes a URL and a element name: It si

Dave Howard - 7,751 views

Auto-complete using ATLAS

Auto-complete using ATLAS Setting up an auto-complete input box in ATLAS is pretty simple, here is a quick guide to illustrate this... Assuming you already have the ATLAS framework referenced in your project then select an <asp:TextBox> to apply auto-complete to. See Mark

Dave Howard - 8,980 views

Creating a Tag Cloud in C#

Creating a Tag Cloud in C# I wanted to add a TagCloud to GeekZilla and another bespoke development project. The first thing I did was look around the web for some examples (or free components). To my supprise none jumped out at me. So, I decided to write my own. At first I found myself

Paul Hayman - 77,858 views

Custom Templated SiteMap Navigator Control

Custom Templated SiteMap Navigator Control After discovering the power of the SiteMap, especially when linked to Authentication, it wasn't long before binding the TreeView to the map was not enough. I needed to have total control over what was displayed to the user for each item, so I

Paul Hayman - 6,282 views

Redirect a page using a Header

Redirect a page using a Header Any keen surfer will be familiar with Affiliate Marketing, its a huge industry with Google's Adwords driving "Pay Per Click" campaigns. Google provide the Adwords application and Google Analytics to track the effectiveness of marketing campaigns from click thr

Paul Marshall - 16,298 views

Comparing ATLAS and Dojo (part 1)

Comparing ATLAS and Dojo (part 1) This is a first article in a series comparing some of the functionality of ATLAS with another popular AJAX framework called Dojo. Both frameworks have some powerfull components and there is a high degree of overlap. This first article is a straight com

Mark Page - 12,920 views

Programmatically adding LINKs to HTML HEADER in Code Behind

Programmatically adding LINKs to HTML HEADER in Code Behind In this example I am adding a link to the html header pointing to an rss feed. HtmlLink link = new HtmlLink(); link.Attributes.Add("type", "application/rss+xml"); link.Attributes.Add("rel",&

Paul Hayman - 13,341 views

Adding ATLAS to an Existing Web Application

Adding ATLAS to an Existing Web Application Recently had to add ATLAS to an existing ASP.NET 2.0 application and found that there is more to it than simply adding a reference to the Microsoft.Web.Atlas.dll. I tried registering the assembly in an <@ Register> tag after adding the

Mark Page - 21,392 views

Integrating Dojo Fisheye and SiteMapDataSource

Integrating Dojo Fisheye and SiteMapDataSource Everybody seems to be getting excited over this AJAX thing. Even Microsoft are (at last... ok they started it with OWA) getting on the bandwagon with the Atlas libraries. Of course just because Atlas exists doesn't mean you cannot use some

Mark Page - 13,871 views

Extending web.sitemap

Extending web.sitemap If you are using ASP.NET you are probably already familiar with the new sitemap components. The sitemapdatasource and web.sitemap elements make it very easy to build and maintain rich site structures. Using the Eval statement and recursing across the siteMap

Mark Page - 10,946 views

Launching an Atlas ModalPopupExtender from JavaScript

Launching an Atlas ModalPopupExtender from JavaScript Looking for an Ajax version of this article?? Looking round the web there are some crazy ways people are trying to launch the ModalPopupExtender from JavaScript, the most common way being setting a timeout which calls the Click meth

Paul Hayman - 54,499 views

Remembering position of DragOverlayExtender with Profile

Remembering position of DragOverlayExtender with Profile You can get Atlas to store the last known position of your floating panel in the profile. Three things you need to do to get this to work. ProfileScriptService In the page with the DragOverlayExtender you'll need to

Paul Hayman - 5,656 views

Intellisence not working in web.config?

Intellisence not working in web.config? Visual Studio 2005 has an interesting "feature" where Intellisence will not pop up when you're editing a web.config file. Annoying eh? Well, I found that removing the namespace from the configuration tag kicks it all back into life. Change the fo

Paul Hayman - 3,794 views

Changing the password rules for Forms Authentication

Changing the password rules for Forms Authentication An annoying feature of the forms authentication controls shipped with VS2005 is that it forces users to enter non-alphanumberic characters in their passwords by default.. e.g. password would have to be password! Fortunately, this opt

Paul Hayman - 4,729 views

Stopping simultaneous logins (Forms Authentication)

Stopping simultaneous logins (Forms Authentication) The following code (called from a page load) will bump off users who are logged in when someone else logs in with the same credentials. publi

Paul Hayman - 5,656 views

Updating Foreign keys in a GridView

Updating Foreign keys in a GridView A GridView generally shows and allows the user to update rows in a database. They are easy to set up until the values that you want to update is a foreign key. Its not obvious how to send the appropriate value back to the database or how to

Dave Howard - 12,335 views

Referencing ConfigurationManager

Referencing ConfigurationManager When I started working in VS2005, I assumed that accessing your AppSettings would be the same as it was in VS2003. On compiling, the IDE served up the following warning. 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method

Barrington Haynes - 5,637 views

Programmatically resolving ~ URL's to the Virtual Root using ResolveURL()

Programmatically resolving ~ URL's to the Virtual Root using ResolveURL() It's common knowledge that a control, when Runat="server" will resolve it's src or href attribute to a virtual root when the URL starts with ~/ For example: <a href="~/Customers/Profile.aspx" Runat=

Paul Hayman - 41,099 views

Select a row in an asp:GridView without using a Select Command

Select a row in an asp:GridView without using a Select Command ASP.Net's GridViews can be quite useful, but beware of binding them to huge datasets as this has an overhead on the ViewState. Often you'll want to display a number of columns on each line and row space becomes an issue. W

Paul Marshall - 489,699 views

Error in Line 3?

Error in line 3 Some websites report an error in line 3 when using the asp.net controls such as login. We recently tracked this error down on one of our sites to the use of custom HttpHandlers. All requests to anything other than *.aspx were routing through our own handler.. Addi

Paul Hayman - 3,766 views