Monday, January 24, 2011

c# read value from registry

Hi Guys

Following Code will help for how to read values from registry.

RegistryKey regKeyAppRootforET = Registry.LocalMachine.OpenSubKey("SOFTWARE\\YourApplicationName\\KeyName");
if (regKeyAppRootforET != null)
{
if (regKeyAppRootforET.GetValue("KeyName") != null)
{
registryValue = regKeyAppRootforET.GetValue("stringorbinaryKey").ToString();
}
}

Friday, January 21, 2011

Javascript Tips

1)How To Reload the Parent Page Using Javascript

top.location.reload(true);

2)How To Create New Line in Javascript

using "\\n"

sample

alert('sample First Line\\n test')