Mian Sahib Jan 0 Newbie Poster

i have a repeater in one page to which me load the data from database now i want to click a button and i get the value of a repeater specific row data and kept data in session and access that data an another page.plz help me any one have any idea or any simple code.
i will be very thank full for yours this kindness.
YOur sinser Regard Mian sahib Jan .
me have the following code.now i to access these value from a repeater and keep it in session.
/////

<asp:Repeater ID="Repeater1" runat="server" >
``
                                <table border="1" width="100%">
                            <tr>
                            <th>ItemImage</th>
                            <th>Item Name</th>
                            <th>Item Price </th>
                             <th>Quantity</th>                 
                            </tr>
                    </HeaderTemplate>
          <ItemTemplate>
              <tr><td>
                <asp:Image ID="imgBooks" runat="server" Width="220px" Height="180px" ImageUrl='<%# Bind("ItemImage", "~/ImageStorage/{0}") %>' style="padding-left:40px"/><br />
                </td>

                  <td>
                <asp:Label ID="lblBookName" runat="server" Text='<%# Bind("ItemName") %>'></asp:Label>
                  </td>


                  <td>
                <asp:Label ID="lblPrice" runat="server" Text='<%# Bind("ItemPrice") %>'></asp:Label>
                      <br />
                      <br />

                       <button type="button" id="btnAddItem" value="" class="btn   btn-danger" >
                   <span class="glyphicon glyphicon-shopping-cart"></span>Add Item </button>

              </td>


                  <td>
                <asp:Label ID="lblCity" runat="server" Text=' <%# Bind("ItemQuantity") %>'></asp:Label>

                      </td>
              </tr>
          </ItemTemplate>
                       <FooterTemplate>
                    </table>
                    </FooterTemplate>
        </asp:Repeater>
        ///
        back end code/////
         protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            BindData();
        }
    }
    protected void BindData()
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["strcon"].ConnectionString);
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }

        DataSet ds = new DataSet();
        string Query = "Select * from Items where Category=1";

        SqlCommand cmd = new SqlCommand(Query, con);

        SqlDataAdapter adp = new SqlDataAdapter(cmd);

        adp.Fill(ds);

        Repeater1.DataSource = ds.Tables[0];

        Repeater1.DataBind();

    }


}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.