Looking for a good ASP.Net front-end developer in New York City

A client I’ve been working with is looking for a front-end ASP.Net developer to work on-site for them in their New York City (midtown) office.

The right candidate should be able to:

develop a complex ASP.Net solution using WebForms;
create web markup (HTML/CSS) from Photoshop mockups;
use ASP.Net Ajax, jQuery, or other client-side solutions, and know when to use what;
write efficient front-end code that is tested and works well across a wide range of browsers;
come up with user interface solutions (i.e. help define the client side of the business requirements);
be able to write code-behind and be able to read, understand, and enhance existing business logic code.

If you or someone you know has the right stuff, send me an email with your resume and I’ll pass . . .

→ Read More: Looking for a good ASP.Net front-end developer in New York City

Cleaning up the GridView’s EmptyDataTemplate (damn those tables!)

A project I’ve been working on makes frequent use of the ASP.Net GridView. However, as many people know, the GridView has one glaring issue: It wraps your <EmptyDataTemplate> in an HTML table — something that I don’t want, for two reasons:

My empty data template does not consist of tabular data.
My stylesheet has a default style for tables — a style that I don’t want applied to my empty data template.

One solution is to use the CSS Friendly Adapters for ASP.Net, which potentially solves both prolems, but that will bring in potential breaking changes to my GridView controls. I don’t have time for that (yet).

The solution I came up with is to do two things:

Create a new CSS class that removes table formatting (borders, backgrounds, padding, margins, etc.). This class will be applied to the GridView only when it has no data.
Add a line of code in the OnPreRender() method for each web page or control that . . .

→ Read More: Cleaning up the GridView’s EmptyDataTemplate (damn those tables!)

Rewriting the ASP.Net CSS Friendly Adapters – does anyone care?

A few days ago, I wrote a lengthy post on the official ASP.Net forums where I discussed some thoughts on a new version of the CSS-friendly ASP.Net control adapters. In the post, I outlined some new approaches to improve testability and configuration.

Since that post (written on the evening of Sept 16), there have been no replies, which leads me to consider a few possible realities…

No one reads the ASP.Net forums. (Not true; the post was read at least 79 times, as of this writing.)
No one posts on the ASP.Net forums.  (Not true; other posts were written since my post.)
No one uses the CSS Friendly adapters. (Not true; they have been downloaded over 1,800 times in the last week, according to CodePlex — making it the 14th most popular CodePlex project in that time.)
No one cares about rewriting them.
No one who cares about rewriting them reads the ASP.Net forums.

OK, so either no one cares about improving on what we currently . . .

→ Read More: Rewriting the ASP.Net CSS Friendly Adapters – does anyone care?

Remove anonymous users from ASP.Net Membership tables

If you use the ASP.Net membership tools, have <anonymousIdentification enabled=”true” /> specified in your Web.config, and get lots of anonymous visitors, it’s only a matter of time before your database grows. What’s filling it up is the countless user records for your anonymous users.

If you don’t need to track user and profile information for an anonymous user once they leave the site, you can delete the unneeded data by running a SQL script. The following script will delete from your membership tables all anonymous users whose last activity was more than 7 days ago.

delete from aspnet_profile
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_usersinroles
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_membership
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_personalizationperuser
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) . . .

→ Read More: Remove anonymous users from ASP.Net Membership tables

Firefox, LinkButtons, and the Panel.DefaultButton: a (Prototype) fix

Recently I’ve stepped away from the MonoRail world to work on a project that uses ASP.Net WebForms. It didn’t take long before I found an annoying problem. (Actually I found many annoying problems, but I’ll focus on one here.)

The <ASP:Panel> control has a DefaultButton property which, according to the documentation, "Gets or sets the identifier for the default button that is contained in the Panel control." In other words:

Use the DefaultButton property to indicate which button gets clicked when the Panel control has focus and the user presses the ENTER key.

It works perfectly, if you’re not using a LinkButton control. Actually, that’s not true; if you use a LinkButton control and Internet Explorer, it works fine. It just doesn’t work in Firefox. Why?

Dmytro Shteflyuk outlines why in his blog post, Using Panel.DefaultButton property with LinkButton control in ASP.Net. Apparently, it’s an issue with the JavaScript code that Microsoft generates, which expects a click() method on the anchor (i.e. . . .

→ Read More: Firefox, LinkButtons, and the Panel.DefaultButton: a (Prototype) fix