For x As Integer = 0 To txtempid.Text.Length – 1 ‘this code to check each of employee entry If Session("dtOT") Is Nothing Then ‘initialize session dtOT = DBLayer.Util.Data.MsSql.DBFunction.BuildDataTable("SELECT * FROM Q_OTDETAILS WHERE REGISNO_T = ''", DBLayer.ClsConnection.getConnString("EPJ_HRMS")) Else dtOT = Session("dtOT") End If ‘------------here assign var to update in session dtOT.Rows.Add(Nrow) *----------update in session dtOT.AcceptChanges() Session("dtOT") = dtOT Session("ItmNo") = Nothing *--reset session End If End If Next txtempno.Text = "" Session("dtOT") = dtOT Me.Datagrid1.DataSource = dtOT Me.Datagrid1.DataBind()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)