for an idea of how i want the images to be displayed check out this link : http://www.redbox.com/movies
i tried the repeater with the datalist but it kept repeating the same content for each row so i tried changing the select parameter in the repeaters itemcreated and itemdatabound event but it stopped displaying the content for each event i tried.
Dim p1 As Integer = Convert.ToInt32(SqlDataSource1.SelectParameters("p1").DefaultValue)
Dim p2 As Integer = Convert.ToInt32(SqlDataSource1.SelectParameters("p2").DefaultValue)
p1 = p1 + 4 // minimum range
p2 = p2 + 3 // maximum range
SqlDataSource1.SelectParameters("p1").DefaultValue = p1
SqlDataSource1.SelectParameters("p2").DefaultValue = p2
i added '4' to p1 because i want only 4 columns. The datalist inside the repeater is set initially to display data between 1 and 4. Now after each repetition i want the min range and max range to change like so : 1 and 4, 5 and 8 and so on.
this is the sql select statement and parameters :
SelectCommand="SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY movieID ASC) AS rownumber, [movieID], [movieImageUrl], [movieName], [movieGenre], [movieDescription], [movieStatus] FROM [myMovieRentalDB].[dbo].[movieList]) AS foo WHERE rownumber between (?) and (?)">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="p1" Type="String" />
<asp:Parameter DefaultValue="4" Name="p2" Type="String" />
</SelectParameters>
Please help me out i use Visual Basic and Ms Sql Server 2008..

New Topic/Question
Reply



MultiQuote


|