.Net Links

Monday, March 29, 2010

how to make BoundField visible as false and get the values

Here the below line will help you to get the hidden column values.
DataKeyNames="EID"
GridContgorl id = gvCategory



Response.Write("Value" + gvCategory.DataKeys[i].Value.ToString() + "
");

Labels: ,

Monday, March 15, 2010

How to allow Alphabets,Periods,Dash(-) in Javascript

The below script will allow only Alphabets,Periods,Dash(-) to be entered in Text Box

Works in IE,FF,Chrome

function blockNumbers(e) {

//In FireFox Back-Space Key Code=8 , Tab KeyCode=0
//In IE Back-Space Key Code=Null , Tab KeyCode=9

isIE = document.all ? 1 : 0
keyEntry = !isIE ? e.which : event.keyCode;
if(!(((keyEntry >= '65') && (keyEntry <= '90')) || ((keyEntry >= '97') && (keyEntry <= '122')) || (keyEntry == '46') || keyEntry == '45' || keyEntry == '0' || keyEntry == '8' || keyEntry == '9'))
{
alert("Only Alphabets,Periods,Dash allowed");
return false;
}
}


Labels: , , , ,

Friday, March 5, 2010

HowTo Make IE8 Display Your Website in IE7 Compatibility Mode

Add the below tag before HTML tag.
Please enclose it in a tag.

meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible"

Labels: ,