the above error display in internet explorer window. How to solve the error.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public class global
{
SqlConnection con = new SqlConnection("server=DHINESH\\SQLEXPRESS;database=password;integrated security=true");
SqlCommand Com;
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
SqlDataReader dr;
public global()
{
openCon();
}
~global()
{
closeCon();
}
public void openCon()
{
string s = ConfigurationManager.ConnectionStrings["con"].ToString();
this.con = new SqlConnection(s);
this.con.Open();
}
public void closeCon()
{
this.con.Close();
}
public int gettable(string[,] MyInparam, string MySpname)
{
this.Com = con.CreateCommand();
this.Com.CommandText = MySpname.ToString();
this.Com.CommandType = System.Data.CommandType.StoredProcedure;
for (int i = 0; i < MyInparam.Length / 2; i++)
{
Com.Parameters.AddWithValue(MyInparam[i, 0], MyInparam[i, 1]);
}
int a= this.Com.ExecuteNonQuery();
return a;
}
public int getvalue(string query)
{
this.Com=con.CreateCommand();
this.Com.CommandText=query.ToString();
this.Com.CommandType = CommandType.Text;
int a = (int)Com.ExecuteScalar();
return a;
}
public DataSet getdata(string query)
{
this.Com = con.CreateCommand();
this.Com.CommandText = query.ToString();
this.Com.CommandType = CommandType.Text;
this.da = new SqlDataAdapter(Com);
this.da.Fill(ds);
return ds;
}
public DataSet getdataset(string[,] MyInparam, string MySpname)
{
ds = new DataSet();
this.Com = con.CreateCommand();
this.Com.CommandText = MySpname.ToString();
this.Com.CommandType = System.Data.CommandType.StoredProcedure;
for (int i = 0; i < MyInparam.Length / 2; i++)
{
Com.Parameters.AddWithValue(MyInparam[i, 0], MyInparam[i, 1]);
}
this.da = new SqlDataAdapter(Com);
this.da.Fill(ds);
return ds;
}
public string CreateRandomCode(int codeCount)
{
string allChar = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
string[] allCharArray = allChar.Split(',');
string randomCode = "";
int temp = -1;
Random rand = new Random();
for (int i = 0; i < codeCount; i++)
{
if (temp != -1)
{
rand = new Random(i * temp * ((int)DateTime.Now.Ticks));
}
int t = rand.Next(36);
if (temp != -1 && temp == t)
{
return CreateRandomCode(codeCount);
}
temp = t;
randomCode += allCharArray[t];
}
return randomCode;
}
}