<add key="keyName" value="keyValue" />
Access the AppSetting by calling it in your code behind:
ConfigurationManager.AppSettings.Get("keyName")
The "Ten Commandments", if you will, of .NET development. Definitely not limited to ten, nor groundbreaking by any means, this blog emphasizes simple code that any .NET developer should know; without the fluff and bloated code examples. "Just show me how to..."
<add key="keyName" value="keyValue" />
ConfigurationManager.AppSettings.Get("keyName")
Public Function GiveDec(Hex)
if Hex = "A" then
Value = 10
elseif Hex = "B" then
Value = 11
elseif Hex = "C" then
Value = 12
elseif Hex = "D" then
Value = 13
elseif Hex = "E" then
Value = 14
elseif Hex = "F" then
Value = 15
else
Value = Hex
end if
GiveDec = Value
End Function
Public Function HexToDec(Hex)
Dim a,b,c,d,e,f,x,y,z,fHex
fHex = Replace(Hex,"#","")
a = Left(fHex,1)
a = GiveDec(a)
b = Mid(fHex,2,1)
b = GiveDec(b)
c = Mid(fHex,3,1)
c = GiveDec(c)
d = Mid(fHex,4,1)
d = GiveDec(d)
e = Mid(fHex,5,1)
e = GiveDec(e)
f = Right(fHex,1)
f = GiveDec(f)
x = (a * 16) + b
y = (c * 16) + d
z = (e * 16) + f
HexToDec = """" & x & "," & y & "," & z & """"
End Function
function format(input){
var num = input.value.replace(/\,/g,'');
if(!isNaN(num)){
if(num.indexOf('.') > -1){
num = num.split('.');
num[0] = num[0].toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,'');
if(num[1].length > 2){
alert('You may only enter two decimals!');
num[1] = num[1].substring(0,num[1].length-1);
} input.value = num[0]+'.'+num[1];
} else {
input.value = num.toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,'') };
} else {
alert('You may enter only numbers in this field!');
input.value = input.value.substring(0,input.value.length-1);
}
}
function formatInt(input){
var num = input.value.replace(/\,/g,'');
if(!isNaN(num)){
if(num.indexOf('.') > -1) {
alert("You may not enter any decimals.");
input.value = input.value.substring(0,input.value.length-1);
}
} else {
alert('You may enter only numbers in this field!');
input.value = input.value.substring(0,input.value.length-1);
}
}
<input id="text" name="text" size="5" onkeyup="format(this);">