Thursday, 6 September 2012

0 create shopping cart in asp.net

create shopping cart in asp.net

Dear friend here i am going to tell you how to create shopping cart in asp.net using data-list control.

Example of shopping cart
Example of shopping cart

To Make Shopping Cart first open new project.

Select data list control from toolbox.

use below code to design the data list .

            onselectedindexchanged="DataList1_SelectedIndexChanged">
        
   
   
   
   
   
   
   
   
   
   
   

                    Text="Matching Profile to you this Month" Font-Bold="True">
   

                      ImageUrl="~/images/LOGO.png" runat="server"
             Height="170px" />
   

   
   
   
   
   
   
    
   
   
   
   
    
   
   
   
   
    
   
   
   
   
    
   
   
   
   
    
   
   
   
   
   

       
       

                    Font-Size="Small">

       
        

                    Font-Size="Small">

                    Font-Size="Small">
        

                    Font-Size="Small">

       
        

                    Font-Size="Small">

       
        

                    Font-Size="Small">

       
        

                    Font-Size="Small">

   

   
   
   
   
   

    ...........................................................................................................................................
   

   

       



Now go to CS file of that page and wright the code to bind data list on page load.

The code is

 SqlCommand sql = new SqlCommand(" select  Job_Id,Job_title,Eleg,Age,Location,Detail from job  ", con);
        con.Open();
        SqlDataReader reader = sql.ExecuteReader();
        DataList1.DataSource = reader;
        DataList1.DataBind();
        con.Close();






0 comments:

Post a Comment

 

Coding Authority Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates