Hi i am trying to get gried view data from data base numericaly onfter another. For example first 5 data then another five (6 to 10) then again. I am trying this by clicking on link button but page can not be refresh..i get id from session in manual data source of gried view.

'vb code..
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Me.IsPostBack = False Then
            id = 5
        End If
        Session.Add("gid", " " & id & " ")
    End Sub

    Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton3.Click
        MsgBox(" link 2 is clicked")

        id = Integer.Parse(Session.Item("gid").ToString()) + 5

    End Sub

' this is data source query
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:MBHConnectionString %>" 

                    SelectCommand="SELECT * FROM [Softwares] WHERE ([Soft_id] &lt;= @Soft_id and [Soft_id] &gt;= @Soft_id-5) ORDER BY [Soft_id]">
                        <asp:SessionParameter DefaultValue="1" Name="Soft_id" SessionField="gid" 
                            Type="Int32" />
5 Years
Discussion Span
Last Post by RvSon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.