 |
Select a row in an asp:GridView without using a Select Command
Paul Marshall (77592 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
|
 |
Launching an Atlas ModalPopupExtender from JavaScript
Paul Hayman (28524 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
|
 |
Creating a Tag Cloud in C#
Paul Hayman (22731 views)
Creating a Tag Cloud in C#
I wanted to add a TagCloud to GeekZilla. 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 wondering how I would render different size w
|
 |
Adding ATLAS to an Existing Web Application
Mark Page (10097 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 (9467 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 (8809 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 (7655 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
|
 |
Programmatically resolving ~ URL's to the Virtual Root using ResolveURL()
Paul Hayman (7155 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
|
 |
Extending web.sitemap
Mark Page (6403 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 (5901 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
|
 |
Auto-complete using ATLAS
Dave Howard (5640 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
|
 |
Updating Foreign keys in a GridView
Dave Howard (5102 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
|
 |
Lightweight Ajax
Dave Howard (5073 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
|
 |
SQL ViewState
Barrington Haynes (4955 views)
SQL ViewState
Whilst working on a recent project, I was having problems with the size of the view state being downloaded to the client.
Whilst surfing Google, I found the following article which has now solved my problems, http://weblogs.asp.net/adweigert/archive/2004/03/09/86628.aspx
The
|
 |
Custom Templated SiteMap Navigator Control
Paul Hayman (3535 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
|
 |
Remembering position of DragOverlayExtender with Profile
Paul Hayman (3424 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
|
 |
Referencing ConfigurationManager
Barrington Haynes (3104 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
|
 |
Programmatically adding LINKs to HTML HEADER in Code Behind
Paul Hayman (2779 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
|
 |
ASP.NET Framework 1.1 Validation not working in IE7?
Paul Hayman (2362 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
|
 |
Stopping simultaneous logins (Forms Authentication)
Paul Hayman (2080 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
|
 |
LoginStatus not logging users out?
Paul Hayman (2079 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
|
 |
Changing the password rules for Forms Authentication
Paul Hayman (1926 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
|
 |
Display CreateUserWizard Error Messages using a ContentTempate
Paul Marshall (1831 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
|
 |
Intellisence not working in web.config?
Paul Hayman (1616 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 (1576 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 (1015 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 (829 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
|
 |
Customise Password Recovery Email
Paul Marshall (492 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
|