Im using ASP.NET as Front end and SQL Server as Backend. the codings are..
imports system imports system.data imports system.data.sqlclient
After inherits...... some connectin codingd are there
dim con as SqlConnection dim adp as SqlDataAdapter dim com as SqlCommand dim data as Dataset
after the connection codings in Next button the following codings im writing....
dim rec_count as integer = 0 dim row_count as integer = data.Tables(0).Rows.Count - 1 // so by this we will get total number of records. If rec_count <> row_count Then rec_count = rec_count + 1 TextBox1.Text = Data.Tables(0).Rows(rec_count).Item(0) TextBox2.Text = Data.Tables(0).Rows(rec_count).Item(1) Else MsgBox " This is the Last Record "
Like wise im writing for PREVIOUS BUTTON also, only change is [ rec_count = rec_count - 1 ] By writing this,,, when the first time i click in the Next button , it goes to next record, but when next time i click in Next button ... it doesnt change.
then if i click in PREVIOUS button... It shows error like... "There is no record in position -1".
So many times i asked about this? but im not getting the correct solution. So any one Please get me correct soution??