How can we add useing clause in Globa.asas

A

ad

I add the code in the Application_Start of Global.asas

void Application_Start(Object sender, EventArgs e)
{

Hashtable _SystemSet = new Hashtable();
SqlDataReader dr = DM.ExecuteReader("SELECT ColumnID, ColumnC,
ColWidth FROM ColumnSet");
string sKey, sValue;
while (dr.Read())
{
sKey = dr["ColumnID"].ToString();
sValue = dr["ColumnC"].ToString();
_SystemSet.Add(sKey, sValue);
}
dr.Close();
DMHealth.mySetting = _SystemSet;

}

I muse "using System.Data.SqlClient to use SqlDataReader,
Where can I add the using clause in Globa.asas
 
K

Karl Seguin

I take it you aren't using the codebehind page...hence why you can't simply
use using...

use the @Import directive atop the page:

<% @Import Namespace="System.Data.SqlClient" %>


Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top