if you want your add mouseover effect on your web page links you can do it by using style tags.
In this example, i will tell you How you can change link color and appearence When the mouse is placed over the link.In the below example when someone placed mouse over the link the text color will change and the underline disappears.
You can do this by just Place the <STYLE> tag between your <HEAD> and </HEAD> tags.
<STYLE>
<!--
A:active { color:#0000FF; text-decoration; }
A:hover { color:#FF0000; text-decoration: none; }
//-->
</STYLE>
You can change the color code according to your need.
In this example, i will tell you How you can change link color and appearence When the mouse is placed over the link.In the below example when someone placed mouse over the link the text color will change and the underline disappears.
You can do this by just Place the <STYLE> tag between your <HEAD> and </HEAD> tags.
<STYLE>
<!--
A:active { color:#0000FF; text-decoration; }
A:hover { color:#FF0000; text-decoration: none; }
//-->
</STYLE>
You can change the color code according to your need.
In this article I am going to explain how to read or write connection strings in web.config file using asp.net .
Write connection strings in web.config file
In this example i will show you how to write connection string in a Web.config file and also i will show you how to read that connection string from Web.config file .
Write connection strings in web.config file
We write connection string inside connectionStrings element.The connectionStrings element is a direct child of the <configuration> element and a peer of the system.web element.
<connectionStrings>
<add
name="MyConString"
connectionString="Data Source=serverName;Initial
Catalog=YourDataBasename;Persist Security Info=True;User
ID=dbuserName;Password=dbpassword"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
Read connection strings from web.config file
After adding connectionString we need to write the some code in our codebehind file to get connection string from web.config.Below is code which we have to write to read connectionString from web.config file.
C# CODE
using System;
using System;
using System.Data.SqlClient;
using System.Configuration;
public partial class dbString : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//the below line will read ConnectionStrings from web.config file.
string dbstrcon = ConfigurationManager.ConnectionStrings["MyConString"].ConnectionString;
//the below line will create new sqlconnection and connection to database by using connection string from web.config file.
SqlConnection mycon = new SqlConnection(dbstrcon);
mycon.Open();
}
}