i have a dataList-i implement the paging and also onUpdateCommand-the paging working great, but the update command didnt-its take the old values...
i found out that its because i didnt put Not Page.IsPostBack...but when i add it the paging didnt work-i tried to split the bind data but no change...
anyone have any idea how can i do it?
<code>
<script language="VB" runat="server">
Dim pagedData As New pagedDataSource
dim Conn as new OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Reality\DATA.mdb")

Sub Page_Load(byVal obj As Object, byVal e As EventArgs)
' if Not Page.IsPostBack then

doPaging()

'end if

End Sub

Function getTheData() As DataTable
Dim DS As New DataSet()
dim sqlStr as String

sqlStr="SELECT * FROM SekerSikunimWorkers"
Dim objAdapter As New OleDbDataAdapter(sqlStr, Conn)
objAdapter.Fill(DS, "SekerSikunimWorkers")

Return DS.Tables("SekerSikunimWorkers").Copy




End Function

Sub doPaging()
pagedData.DataSource = getTheData().DefaultView
pagedData.AllowPaging = True
pagedData.PageSize = 1

Try
pagedData.CurrentPageIndex = Int32.Parse(Request.QueryString("Page")).ToString()
Catch ex As Exception
pagedData.CurrentPageIndex = 0
End Try

btnPrev.Visible = ( NOT pagedData.IsFirstPage )
btnNext.Visible = ( NOT pagedData.IsLastPage )

pageNumber.Text = pagedData.PageCount & " <- " & (pagedData.CurrentPageIndex + 1)

theDataList.DataSource = pagedData
theDataList.DataBind()
End Sub

Public Sub Prev_Click(ByVal obj As Object, ByVal e As EventArgs)
Response.Redirect(Request.CurrentExecutionFilePath & "?Page=" & (pagedData.CurrentPageIndex - 1))
End Sub

Public Sub Next_Click(ByVal obj As Object, ByVal e As EventArgs)
Response.Redirect(Request.CurrentExecutionFilePath & "?Page=" & (pagedData.CurrentPageIndex + 1))
End Sub

Sub Edit_Command(ByVal sender As Object, _
ByVal e As DataListCommandEventArgs)
' to rebind the DataList to the data source to
' refresh the control.
theDataList.EditItemIndex = e.Item.ItemIndex

doPaging()
End Sub

Sub Cancel_Command(ByVal sender As Object, _
ByVal e As DataListCommandEventArgs)
theDataList.EditItemIndex = -1

doPaging()
End Sub

Sub Update_Command(ByVal sender As Object, _
ByVal e As DataListCommandEventArgs)
Dim tbox As TextBox
Dim sSekerSikunimID, sFollow,sDone,sDate,sExist,sProffesion As String
Dim sActs as string
Dim price As Single

'---retrieves the key for the row---
sSekerSikunimID = theDataList.DataKeys(e.Item.ItemIndex)
response.write("sSekerSikunimID=" & sSekerSikunimID & "<br>")
'---find the textbox control containing the tbFollowBy
sFollow = CType(e.Item.FindControl("tbFollowBy"), TextBox).Text
response.write("sFollow=" & sFollow & "<br>")
' exit sub

'---find the textbox control containing the tbDoneBy
sDone = (CType(e.Item.FindControl("tbDoneBy"), TextBox)).Text
response.write("tbDoneBy=" & CType(e.Item.FindControl("tbDoneBy"), TextBox).Text & "<br>")
'---find the textbox control containing the cbExist
'sExist = CType(e.Item.FindControl("cbExist"), checkBox).checked
'response.write("sFollow=" & sFollow & "<br>")
'---find the textbox control containing the tbDate
sDate = CType(e.Item.FindControl("tbDate"), TextBox).Text
response.write("tbDate=" & sDate & "<br>")
'---find the textbox control containing the tbProffesion
sProffesion = CType(e.Item.FindControl("tbProffesion"), TextBox).Text
response.write("tbProffesion=" & sProffesion & "<br>")
'---find the textbox control containing the tbActs
sActs = CType(e.Item.FindControl("tbActs"), TextBox).Text
response.write("tbActs=" & sActs & "<br>")
exit sub


'Define our sql query
Dim sSQL As String = "UPDATE SekerSikunimWorkers SET " & _
"SekerAct = @acts," & _
"SekerDate = @date," & _
"SekerBy = @by," & _
"SekerMaakav = @maakav," & _
"SekerWorker = @worker" & _
" WHERE SekerSikunimID = @id"



Dim comm As New OleDbCommand(sSQL, Conn)
'Add up the parameter, associated it with its value
comm.Parameters.Add("@acts", sActs)
comm.Parameters.Add("@date", sDate)
comm.Parameters.Add("@by", sDone)
comm.Parameters.Add("@maakav", sFollow)
comm.Parameters.Add("@worker", sProffesion)
comm.Parameters.Add("@id", sSekerSikunimID)

conn.Open()
comm.ExecuteNonQuery()
'Dim drSS As OleDbDataReader = comm.ExecuteReader()

response.write(sSQL)
exit sub

conn.Close()
'drSS.Close()


theDataList.EditItemIndex = -1
doPaging()
End Sub


Sub Delete_Command(ByVal sender As Object, _
ByVal e As DataListCommandEventArgs)
dim sSekerSikunimID as String
sSekerSikunimID = theDataList.DataKeys(e.Item.ItemIndex)
dim strSQL as string = "DELETE FROM SekerSikunimWorkers " & _
"WHERE SekerSikunimID = " & sSekerSikunimID
response.write(strSQL)
Dim comm As New OleDbCommand(strSQL, Conn)

conn.Open()
comm.ExecuteNonQuery()
conn.Close()

theDataList.EditItemIndex = -1
doPaging()
End Sub


</script>

</code>

Thanks a lot!!!!!im sitting on it long time...