Search This Blog

Friday, February 29, 2008

ASP.NET ATOM Feed auto-discovery

Adding a RSS feed auto-discovery code to your site is essentially a usability feature. It allows browsers capable of RSS auto discovery such as IE7, Firefox and Safari to display a nice RSS icon RSS.




How to do that?

add below code to your rss feed after <?xml version="1.0" ?>

<link rel="alternate" type="application/rss+xml" title="Top new 20 posts rated" href="" />

for ATOM feed

<feed xmlns="" xmlns:xxxx="">

where is the feed url

Let me know if you need more info.

Thursday, February 28, 2008

Visual Studio 2005: publish website error - target folder empty

Do you have experience that after you have successfully published your application but the target folder is empty?

  1. Click "Publish Web Site", enter "Target Location", and click OK
  2. Site builds successfully
  3. files in destination directory are deleted
  4. IDE shows "publish succeeded"
  5. Go to check target directory, it's empty.

In my case, it caused by mispell an HTML tag. Fix the tag help to fix the published problems.

If this not work for you, try this alternative suggested by other developers.

Fix IIS mappings for ASP.NET, run the Aspnet_regiis.exe utility:

  1. Click Start, and then click Run.
  2. In the Open text box, type cmd, and then press ENTER.
  3. At the command prompt, type the following, and then press ENTER:
    "%windir%\Microsoft.NET\Framework\version\aspnet_regiis.exe" -i
    In this path, version represents the version number of the .NET Framework that installed on server. Must replace this placeholder with the actual version number when type the command.

Tuesday, February 26, 2008



SET sm.SysConfId = sc.Id
FROM tblSKUMat sm
INNER JOIN tblSysConf sc
ON sm.Id = sc.Id

Monday, February 25, 2008

ASP.NET Cookies is domain dependent

Cookies is Domain dependent. Cookies created under subdomain will not able to retrive when access to To ensure that we can retrive the same cookies, we need to specify the domain
For example, we want to write the information to cookies under mydomain when we access to url

HttpCookie cook = new HttpCookie("mydomain");
cook["UserId"] = userId;
cook["Name"] = username.Text;
cook.Expires = DateTime.MaxValue;

To retrive the cookies information:

if (Request.Cookies["mydomain"] != null)
if (Request.Cookies["mydomain"]["UserId"] != null && Request.Cookies["mydomain"]["Name"] != null)
Session["UserId"] = Convert.ToInt32(Request.Cookies["mydomain"]["UserId"].ToString());
Session["UserName"] = Request.Cookies["mydomain"]["Name"].ToString();

Sunday, February 17, 2008

Get value from dynamic (number) radio button using vbscript

Here is my scenario, i have a ratio button but i'm not sure how many radio button will be populated. It can be one or it can be more than one (Array). I've tried many way to make it work but fail. Finally come out with below work around.

On Error Resume Next
radCount = document.all.RadDynamic.length
If err.number <> 0 then
If document.all.RadDynamic.checked Then
strLogoID = strLogoID & "," & document.all.RadDynamic.value
End If
For i=0 To document.all.RadDynamic.length -1
If document.all.RadDynamic(i).checked Then
strLogoID = strLogoID & "," & document.all.RadDynamic(i).value
End if
End If

Wednesday, February 6, 2008

Happy Chinese New Year

Happy Chinese New Year!

Friday, February 1, 2008

Firefox - Secure and Faster Web Browser

The award-winning Web browser is now faster, more secure, and fully customizable to your online life. With Firefox 2, added powerful new features that make online experience even better.

1. Enjoy a Better Web Experience
Firefox 2 delivers helpful new features to make online experience more productive.

2. Stay Secure on the Web
Firefox continues to lead the way in online security, and now includes active protection from online scams to keep safer.

3. Personalize Your Browser
Choose from over a thousand useful add-ons that enhance Firefox. It’s easy to personalize Firefox to make it your own.