Select a row in an asp:GridView without using a Select Command
Paul Marshall (218086 views)
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. What's
|
Creating a Tag Cloud in C#
Paul Hayman (45187 views)
Creating a Tag Cloud in C#
I wanted to add a TagCloud to GeekZilla and another {bespoke development}http://www.kwiboo.com/Services/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 decid
|
Launching an Atlas ModalPopupExtender from JavaScript
Paul Hayman (44847 views)
Launching an Atlas ModalPopupExtender from JavaScript
{Looking for an '''Ajax version''' of this article??}http://www.geekzilla.co.uk/View38736C2B-BAD3-418A-A5B0-DAC4F1A5A83A.htm
Looking round the web there are some crazy ways people are trying to launch the ModalPopupExtender from JavaScrip
|
Programmatically resolving ~ URL's to the Virtual Root using ResolveURL()
Paul Hayman (15617 views)
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:
#h#<a href="~/Customers/Profile.aspx" Runat="serv
|
Adding ATLAS to an Existing Web Application
Mark Page (14791 views)
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
|
Redirect a page using a Header
Paul Marshall (12849 views)
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 marketi
|
Integrating Dojo Fisheye and SiteMapDataSource
Mark Page (11923 views)
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 other
|
Comparing ATLAS and Dojo (part 1)
Mark Page (10773 views)
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 comparisi
|
Extending web.sitemap
Mark Page (9200 views)
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 acr
|
Typed Masterpage reference
Dave Howard (8384 views)
Typed Masterpage reference
#$#<a href="http://www.dotnetkicks.com/kick/?url=http://www.geekzilla.co.uk/View674ECBC1-7CC3-486E-A580-E4B048E1E3D5.htm"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.geekzilla.co.uk/View674ECBC1-7CC3-486E-A580-E4B048E1E3
|
Updating Foreign keys in a GridView
Dave Howard (7975 views)
Updating Foreign keys in a GridView
#$#<a href="http://www.dotnetkicks.com/kick/?url=http://www.geekzilla.co.uk/ViewD7E7F40C-85F7-47D8-89DE-0FB5F7AFAAE5.htm"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.geekzilla.co.uk/ViewD7E7F40C-85F7-47D8-89DE
|
Auto-complete using ATLAS
Dave Howard (7289 views)
Auto-complete using ATLAS
#$#<a href="http://www.dotnetkicks.com/kick/?url=http://www.geekzilla.co.uk/View7585D539-C094-4211-9FFC-32FABE4D09B5.htm"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.geekzilla.co.uk/View7585D539-C094-4211-9FFC-32FABE4D09B
|
Lightweight Ajax
Dave Howard (6590 views)
Lightweight Ajax
#$#<a href="http://www.dotnetkicks.com/kick/?url=http://www.geekzilla.co.uk/ViewC77497B2-2CD6-4FBC-968C-93AFF2F397EB.htm"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.geekzilla.co.uk/ViewC77497B2-2CD6-4FBC-968C-93AFF2F397EB.htm" bo
|
Custom Templated SiteMap Navigator Control
Paul Hayman (5155 views)
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 wrote
|
Programmatically adding LINKs to HTML HEADER in Code Behind
Paul Hayman (4984 views)
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.
#c#HtmlLink link = new HtmlLink();
#c#link.Attributes.Add("type", "application/rss+xml");
#c#link.Attributes.Add("rel", "alternate");
#c#link.Attribut
|
Display CreateUserWizard Error Messages using a ContentTempate
Paul Marshall (4920 views)
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 implement
|
ASP.NET Framework 1.1 Validation not working in IE7?
Paul Hayman (4735 views)
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
|
Remembering position of DragOverlayExtender with Profile
Paul Hayman (4664 views)
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 add a atlas
|
LoginStatus not logging users out?
Paul Hayman (4448 views)
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
#h#<asp:LoginStatus runat="server" id="loginstatus1" />
This doesn
|
Referencing ConfigurationManager
Barrington Haynes (4198 views)
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 is ob
|
Stopping simultaneous logins (Forms Authentication)
Paul Hayman (3469 views)
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.
#c#public bool ValidSession()
#c#{
#c#
#c# lock (Cache)
#c# {
#c#
#c# string requestU
|
Changing the password rules for Forms Authentication
Paul Hayman (3276 views)
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 option ca
|
Customise Password Recovery Email
Paul Marshall (2837 views)
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 to re
|
Intellisence not working in web.config?
Paul Hayman (2823 views)
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
|
Error in Line 3?
Paul Hayman (2590 views)
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..
Adding the fo
|
Using a .Net 2.0 anonymous delegate when generating a thumbnail
Paul Hayman (2033 views)
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.
#c#delegate() { return false; }
Example
#c#System.Drawing.Image thumbResult = t
|
Set Input Focus on a Control Programatically Added to an ASP.Net Page
Paul Marshall (2011 views)
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 JavaScript
|