Today I downloaded the FireBug Add-on for FireFox. It is very cool tool. I thought the IE toolbar is very useful tool for debugging the UI related issue on the web app. So far, I only play a few functioanlities and I am very impressed. Specially, the "inspect" function. Once you click the button and move the mouse over the page you are looking at, the FireBug will take you directly to the section over the rendered HTML code and show all the style information on the right panel.
You can get FireBug from http://getfirebug.com/
Friday, June 27, 2008
Monday, June 23, 2008
social bookmarking: del.icio.us
del.icios.us is a very convienent online bookmark tool. I found it very helpful to put all your bookmark in a central place. It saves me the trouble from email links to my home in order to keep the bookmark in sync.
You also can share your links with your friends. (i didn't try this feature yet.)
You also can share your links with your friends. (i didn't try this feature yet.)
Tuesday, June 17, 2008
ASP.NET Security: 8 Ways to Avoid Attack
Found a nice article on the Divx on how to avoid attack for asp.net by Wei Meng Lee. All the tips are short and easy to understand.
Tip 1—Cross-site Scripting
Tip 2 —SQL Injection
Tip 3—Validate your User Inputs
Tip 4—Use Hashing to Store your Passwords
Tip 5—Encrypt Sensitive Data
Tip 6—Store Secure Information in the Registry
Tip 7—Do Some Housekeeping before You Deploy Your Web Application
Tip 8—Use Sessions, but Not Cookie-less Sessions
For details, click http://www.devx.com/security/Article/20898/1954?pf=true
Tip 1—Cross-site Scripting
Tip 2 —SQL Injection
Tip 3—Validate your User Inputs
Tip 4—Use Hashing to Store your Passwords
Tip 5—Encrypt Sensitive Data
Tip 6—Store Secure Information in the Registry
Tip 7—Do Some Housekeeping before You Deploy Your Web Application
Tip 8—Use Sessions, but Not Cookie-less Sessions
For details, click http://www.devx.com/security/Article/20898/1954?pf=true
Prevent Cross-Site Scripting in ASP.net
Found a great article on MSDN on how to prevent the cross-site scripting in asp.net. Here is the link: http://msdn.microsoft.com/en-us/library/ms998274.aspx
Monday, June 16, 2008
ASP.net: Set MaxLength in muliti-line textbox
When set the MaxLength property in the textbox, it will prevent user to enter text longer than the MaxLength value. However, when you change the TextMode from SingleLine to MultiLine, the MaxLength property has no effect.
Here is a work-around for this issue:
Here is a work-around for this issue:
const int LENGTH_TEXT = 100;Click here for more detail.
protected void Page_Load(object sender, EventArgs e)
{
string
lengthFunction = "function isMaxLength(txtBox) {";
lengthFunction += " if(txtBox) { ";
lengthFunction += " return ( txtBox.value.length <=" + LENGTH_TEXT + ");";
lengthFunction += " }";
lengthFunction += "}";
this.txtMyTextBox.Attributes.Add("onkeypress", "return isMaxLength(this);");
ClientScript.RegisterClientScriptBlock(
this.GetType(),
"txtLength",
lengthFunction , true);
}
Debug with FireFox in Visual Studio 2005
There are times when we need to make sure that our code not only works with IE, but also with other popular web browsers, such as FireFox.
Here are the steps to do this:
1. Right click the aspx page;
2. Select "browser with" option;
3. In the pop up dialog box, select "add" to add a broswer. Find and point to firefox.exe
4. Click the "Set as Default" button.
Here are the steps to do this:
1. Right click the aspx page;
2. Select "browser with" option;
3. In the pop up dialog box, select "add" to add a broswer. Find and point to firefox.exe
4. Click the "Set as Default" button.
Thursday, June 12, 2008
Cropper in C#
Today I find a very nice screen capture tool. It's small, light, easy to use, FREE, and written in C#. So, no more Ctrl+PrintScreen, then paste to paint to edit.
New step: select the size of the screen need to be captured and double click!! (make sure to select the output types. I like the "clipboard" option to save it to memeory, so I can paste directly in the word doc or outlook email)
It will save the picture to the memory or file (jpeg, bmp, and png)
New step: select the size of the screen need to be captured and double click!! (make sure to select the output types. I like the "clipboard" option to save it to memeory, so I can paste directly in the word doc or outlook email)
It will save the picture to the memory or file (jpeg, bmp, and png)
Brian Scott : Cropper in C#
Subscribe to:
Posts (Atom)