Quotation of the day
"but to have some freshy sweet and tasty strawberry with icecream, who says no to that.."
Man and Woman
As a developer, I am very simple, I speak out what I am thinking, I do not have discrimination against females, no offense either.
What is Female, and what is the relationship between Female and Male?
Female is something that is born to give another family kids, it is more like a recursive method that if one of the kids is a female, then for this kid, all her life is waiting and preparing for giving another family kids. On the other hand, if one of the kids is a male, his life will be waiting for a female to give his family kids.
(Note: homosexual are not considered in this recursive method.)
How to access the sub controls in the PagerTemplate in DataPager .NET control
At least for me, I can not use MyDataPage.FindControl("LblPage") to find my LblPage control in the PagerTemplate.
I have to use an recursive way to locate it.
public static Control FindControlRecursive(Control container, string id)
{
if (container.ID == id)
return container;
foreach (Control control in container.Controls)
{
Control foundControl = FindControlRecursive(control, id);
if (foundControl != null)
return foundControl;
}
return null;
}
Visual Studio 2008 Themes
List below are 8 Visual Studio 2008 themes that I am using or have used before. The default Font for all the themes is "Courier New", and Size is "12".
In order to have a clear view of the themes, I screenshotted all themes with the same code. Since the space is pretty limited, I tried my best to have comments, variables...etc. covered in the code.
I did spend some time on them, hope you will like them. Thanks.
From Yahoo: How TO: 34 Rules to Speed Up Your Web Site
Just copy it from a Yahoo article, I think this is really useful for the website designers.
The Exceptional Performance team has identified a number of best practices for making web pages fast. The list includes 34 best practices divided into 7 categories.
Minimize HTTP Requests
80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages.
One way to reduce the number of components in the page is to simplify the page's design. But is there a way to build pages with richer content while also achieving fast response times? Here are some techniques for reducing the number of HTTP requests, while still supporting rich page designs.
Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single stylesheet. Combining files is more challenging when the scripts and stylesheets vary from page to page, but making this part of your release process improves response times.
CSS Sprites are the preferred method for reducing the number of image requests. Combine your background images into a single image and use the CSS background-image and background-position properties to display the desired image segment.
Image maps combine multiple images into a single image. The overall size is about the same, but reducing the number of HTTP requests speeds up the page. Image maps only work if the images are contiguous in the page, such as a navigation bar. Defining the coordinates of image maps can be tedious and error prone. Using image maps for navigation is not accessible too, so it's not recommended.
Inline images use the data: URL scheme to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages. Inline images are not yet supported across all major browsers.
Reducing the number of HTTP requests in your page is the place to start. This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer's blog post Browser Cache Usage - Exposed!, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.
How to Set or Change the HeadText values in GridView control
GridView control offers us to bind the data and list the data in columns with nice format. However, when I want bind the HeadText properties for the columns of the data, I have to use this way:
--------------------------------------------------------------------------------
MyGridView.Columns[0].HeadText = "Head Text For Column 1"; MyGridView.Columns[1].HeadText = "Head Text For Column 2";
--------------------------------------------------------------------------------
Just FYI, *_*








