Dear Geeks,
I got stuck in a problem in morning
as till now I have a class CGeneral
where I have declared my SqlConnection con as static and invoked there like this
It was working well in single user web application but when we try to login with multiple users we stuck in a problem we get error.
So what will be the best place to declare it and as i will need to open it again and again and close it again and again.
So, I want to get rid of this issue also please suggest me as i am in a huge trouble right now.
I am attaching a file which is my Class file from where I do the things for my application
I got stuck in a problem in morning
as till now I have a class CGeneral
where I have declared my SqlConnection con as static and invoked there like this
Code:
private static string constr = DecValue(ConfigurationManager.ConnectionStrings["FinCon"].ConnectionString); public static SqlConnection con =new SqlConnection(constr);
So what will be the best place to declare it and as i will need to open it again and again and close it again and again.
So, I want to get rid of this issue also please suggest me as i am in a huge trouble right now.
I am attaching a file which is my Class file from where I do the things for my application
Comment