Author: rat170 | Posted on: 11/9/2009 11:57:00 AM | Views : 512

Hi,
Please check my code, This is in my Page Load function

Dim div As System.Data.DataView detail.SelectCommand = "select top 1 title, heading, description, detail from [temp]" div = CType(detail.Select(DataSourceSelectArguments.Empty), System.Data.DataView) string_one = CType(div.Table.Rows(0)(0), String) string_two = CType(div.Table.Rows(0)(1), String) string_three = CType(div.Table.Rows(0)(2), String) string_four = CType(div.Table.Rows(0)(3), String) div.Table.Reset()
What I have done is retrieved the top row of my database table and then put the data in local string variables. The page runs fine first time but on 2nd load it gives an error that There is no row at position 0. I have reset the div at end of code because If I dont thevalues remain the same on second page load whereas the values of my table [temp] changes on every page load. What can I do to rebind value from database on eac ...

Go to the complete details ...