irealtysolution
08 May 2012, 10:04 AM
Hi,
I am a Classic ASP developer and now learning ASP.net.
In Classic ASP, I developed a few functions that Connects, Executes Queries & Disconnect databases like for example:
//To Connection to db
set objConn = connectDB()
//Exceute Select Query
set rRecordSet = executeQuery("sql query here", objConn)
//Disconnect database
disConnect(objConn)
Is there any Expert .Net developer who can guide me on how to create similar functions in .Net so that I do not have to write same db connection code in each page of application.
Thanks!
I am a Classic ASP developer and now learning ASP.net.
In Classic ASP, I developed a few functions that Connects, Executes Queries & Disconnect databases like for example:
//To Connection to db
set objConn = connectDB()
//Exceute Select Query
set rRecordSet = executeQuery("sql query here", objConn)
//Disconnect database
disConnect(objConn)
Is there any Expert .Net developer who can guide me on how to create similar functions in .Net so that I do not have to write same db connection code in each page of application.
Thanks!