OOP Coding
--------------
Dim con As New
SqlConnection(C onfigurationSet tings.AppSettin gs("ConnectionS tring"))
Dim cmd As System.Data.Sql Client.SqlComma nd = New SqlCommand
Try
cmd.CommandText = "Insert into TBL_CLAIM_SUMMA RY Select * from
TBL_MISCELLANEO US"
cmd.Connection = con
con.Open()
cmd.ExecuteNonQ uery()
Finally
con.Close()
End Try
con.Dispose()
con = Nothing
cmd = Nothing
The above coding is require by page1.aspx,page 2.aspx and page3.aspx and how
to perform OOP approach?
Currently I write this coding in every aspx whichever I require but it is
too difficult to maintain.
Please advise and please help.
--------------
Dim con As New
SqlConnection(C onfigurationSet tings.AppSettin gs("ConnectionS tring"))
Dim cmd As System.Data.Sql Client.SqlComma nd = New SqlCommand
Try
cmd.CommandText = "Insert into TBL_CLAIM_SUMMA RY Select * from
TBL_MISCELLANEO US"
cmd.Connection = con
con.Open()
cmd.ExecuteNonQ uery()
Finally
con.Close()
End Try
con.Dispose()
con = Nothing
cmd = Nothing
The above coding is require by page1.aspx,page 2.aspx and page3.aspx and how
to perform OOP approach?
Currently I write this coding in every aspx whichever I require but it is
too difficult to maintain.
Please advise and please help.
Comment