Friday, September 25, 2009

Visual studio javascript is not updating.

No matter you Clean solution or Rebuild solution. The JavaScript file will not be updated.

Solution:
Download the .js file from IE - type in the JavaScript file path.
LIKE: http://localhost:49573/js/javascript.js
Download it.

Return you solution. The JavaScript file will be updated. I think it remind the IIS JavaScript has been change.

Finally, I found that is because IE browser temporary file is full. Try to delete them and refresh the page.

Thursday, September 24, 2009

SQL: using while loop; variable; UPDATE from SELECT

DECLARE @id as INT
SET @id = 1
WHILE @id <= 15973
BEGIN
UPDATE tblADD_UNEMP SET PRIVATEPAYOCCUPANCY=(SELECT PRIVATEPAYOCCUPANCY/10 FROM tblADD_UNEMP WHERE ID = @id) WHERE ID = @id
SET @id = @id + 1
END

Tuesday, September 22, 2009

Get the ImageButton ID from behind code(C#)

ImageButton ibtn = sender as ImageButton;
if (ibtn != null)
{
string theID = ibtn.ClientID;
}

Friday, September 4, 2009

Expression C#

integer: (^([0-9]*|\d*\d{1}?\d*)$)
decimal: ^(\d|-)?(\d|,)*\.?\d*$
Email: \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*