-[Danny Chen]- Blog of an ASP.NET QA tester

Tips and info about Site Navigation, ImageMap, Menu and other cool ASP.NET v2.0 features.

February 2006 - Posts

We are Hiring.

Do you want to help make ASP.NET and Visual Studio even better in the next version?  We are looking for the brightest and the most talented candidates to fill some challenging positions in our team.  If you think you have the skills, guts, and determination to help improve the lives of web developers and shape web technology for the future, follow this link and submit your resume.

http://forums.asp.net/1197654/ShowPost.aspx

UPDATE:  I've received quite a few submissions from people through comments or direct email.  While I really appreciate the interest you've shown, unfortunately, I am not the hiring manager and therefore these decisions are not mine to make.  So, I will not be able to respond to these posts or publish any of the submissions through feedback.  If you're interested, you NEED to follow the link above.

A custom control challenge - make a page loading control that just works.

It is a fairly well known technique to use Response.Buffer and Response.Flush to make a "please wait" or "Loading..." message appear when you know a page is going to take a while to load.  So I was quite estatic when I read on ScottGu's blog that someone (Daniel Fisher) had done what I've wanted to do for a while: formalize this trick into a nice tidy custom control you can just drop onto a page.  You can see it here:  http://www.lennybacon.com/PleaseWaitBuildingAWaitScreenControlForASPNET.aspx.  It is really a very slick control.  However, there was one problem I couldn't (and still can't) figure out which stopped me from writing this control initially.  When I look more closely at Daniel's code, I noticed that he hadn't solved this problem either.

The problem

How do you write the control so that it doesn't wrap a specific function but instead works against the natural page loading time itself.  Here's a scenario to help describe what I mean.  Lets say you develop a page with a couple GridView's and DetailsViews bound to SqlDataSource's.  Everything works great in your mock up but as soon as you deploy it against your live data, you find that the page takes 2-8 seconds to load.  It would be awesome if you could simple take this "loading ..." control, drop it onto your page and -bang- the functionality is added.  Now, I know there's an easy solution using Daniels code and simple adding the DataBinding logic into his OnProcess method, but that's not the point.  This should be a drag-and-drop solution.

The challenge

Create a custom control that provides similar functionality to Daniels but works against the page processing time.  A "drag and drop" kind of solution.  If you think you can do something that even I can't figure out how to do, please contact me through my blog and I will get back to you over email.  I'll post the best submissions I receive and declare the submitters to be "Elite ASP.NET Hackers"

 

Saving unicode content with encoding

Here's a quick tip that you may or may not know about.  In Visual Studio (and possibly other MS programs) it's not enough to paste some unicode content into your file and then hit save.  You'll also need to save it with the correct encoding.  However, once you save the file with a particular encoding, it will continue to use that encoding until you switch it (this means you won't have to keep doing this for each save)

Here are the steps to do this: 

simple choose file->save as
in the save-as dialog the "Save" button has a little pull down arrow.
Select this arrow and then choose "Save With Encoding"
This will open a dialog with a drop down that lists all the supported encodings.

Here are some screenshot to help out:

 

More Posts