Click here to Skip to main content
16,012,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my DataList.aspx code
ASP.NET
<asp:DataList ID="DataList1" runat="server"  ItemStyle-CssClass="item1"
           DataKeyField="BookId" 
            CellPadding="1" GridLines="Both" RepeatColumns="1"  BorderWidth="1px"
            onupdatecommand="DataList1_UpdateCommand" 
            ondeletecommand="DataList1_DeleteCommand1" 
            oneditcommand="DataList1_EditCommand" 
        
            oncancelcommand="DataList1_CancelCommand1" ForeColor="#333333" 
            onitemcommand="DataList1_ItemCommand" >      
         <itemtemplate>
     
      <fieldset style="width:550px">

      <span> <div id="divname" style="padding-removed5px;">
             <img src='Resources/<%#Eval("ImageUpload") %>' width="90px" height="90px" style="padding-left:40px" alt="No Image" /><br /> 
      BookName : <%#DataBinder.Eval(Container.DataItem, "BookName")%><br />
        Author : <%#DataBinder.Eval(Container.DataItem, "Author")%><br />
        Publisher : <%#DataBinder.Eval(Container.DataItem, "Publisher")%><br />
        Price : <%#DataBinder.Eval(Container.DataItem, "Price")%><br />
       
   <asp:ImageButton ID="ImgEdit" runat="server" ImageUrl="~/Resources\imagesneww.jpg" CommandName="Edit" />     
        <asp:ImageButton ID="ImageDelete" runat="server" ImageUrl="~/Resources\edit-delete-icon.png" CommandName="Delete" CausesValidation="false"/>
         <asp:ImageButton ID="ImageSend" runat="server" ImageUrl="~/Resources\send.jpg" CommandName="Send"  CausesValidation="false"/>
      </div></span></fieldset>
        </itemtemplate>
Posted
v3

1 solution

Use Session to store Datatable.

Example In form 1 after filling your data table store your data in a session
C#
Session["Data"] = dt;
//Here dt is the table containing your data

In form 2 get the data back from datatable
Code
C#
DataTable dt = new DataTable();
dt = (DataTable)Session["Data"];
 
Share this answer
 
Comments
Member 11653844 30-Apr-15 6:29am    
thanks for your support =)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900