drupal stats

How to add icon to website

How to add icon to website thumb How to add icon to website

To add an icon for the website you just add the following code to the head element:

<LINK REL="SHORTCUT ICON" HREF="http://www.domain.com/iconname.ico">

 

CODE Example:

<HEAD>

<LINK REL="SHORTCUT ICON" HREF="http://www.domain.com/iconname.ico">

<TITLE>Page Title</TITLE>

</HEAD>

Get Connection String from app.config, web.config

Get connection string by connection’s name

string conn = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;

 

or

string conn = ConfigurationManager.ConnectionStrings[1].ToString();



Copying Rows from One Table to Another – C#

Use Clone method to copy the table structure (Schema)

DataTable dtProductCopy = new DataTable();

dtProductCopy = dtProduct.Clone();

 

Use the ImportRow method to copy from Product table to its clone

for (int i = 0; i < dtProduct.Rows.Count; ++i)

{

    dtProductCopy.ImportRow(dtProduct.Rows[i]);

}

Get Windows Folder using C#

Environment.GetEnvironmentVariable("SystemRoot");

 

or

Environment.GetEnvironmentVariable("windir");

Get current username in Windows using C#

System.Security.Principal.WindowsIdentity.GetCurrent().Name;

Page 1 of 2012345678910...20...Last »