Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Binding data in datalist using stored procedure

Binding data in datalist using stored procedure

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasehelpasp-netwpf
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codingrocks
    wrote on last edited by
    #1

    I am using a datalist in which i want to bind some data from database on page load.. I am using the following code for doing this...throws an error saying Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Data.DataSet' to 'System.Web.UI.WebControls.DataList' Source Error: Line 29: cmd.CommandType = CommandType.StoredProcedure; Line 30: SqlDataAdapter adpt = new SqlDataAdapter(cmd); Line 31: ds = new DataSet(); Line 32: adapter.Fill(ds); Line 33: conn.Close(); Please help me...?

    SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

    J S M 3 Replies Last reply
    0
    • C codingrocks

      I am using a datalist in which i want to bind some data from database on page load.. I am using the following code for doing this...throws an error saying Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Data.DataSet' to 'System.Web.UI.WebControls.DataList' Source Error: Line 29: cmd.CommandType = CommandType.StoredProcedure; Line 30: SqlDataAdapter adpt = new SqlDataAdapter(cmd); Line 31: ds = new DataSet(); Line 32: adapter.Fill(ds); Line 33: conn.Close(); Please help me...?

      SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

      J Offline
      J Offline
      Jintal Patel
      wrote on last edited by
      #2

      hii show me your code where u assign dataset to datalist your connection And filling dataset from storeprocedure is right..

      Jintal Patel

      1 Reply Last reply
      0
      • C codingrocks

        I am using a datalist in which i want to bind some data from database on page load.. I am using the following code for doing this...throws an error saying Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Data.DataSet' to 'System.Web.UI.WebControls.DataList' Source Error: Line 29: cmd.CommandType = CommandType.StoredProcedure; Line 30: SqlDataAdapter adpt = new SqlDataAdapter(cmd); Line 31: ds = new DataSet(); Line 32: adapter.Fill(ds); Line 33: conn.Close(); Please help me...?

        SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        Might be this is not error source code Where are you binding your dataset to datalist control ?

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        C 1 Reply Last reply
        0
        • S Sandeep Akhare

          Might be this is not error source code Where are you binding your dataset to datalist control ?

          Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

          C Offline
          C Offline
          codingrocks
          wrote on last edited by
          #4

          Its working fine but i want to paginate it... is there any possibility that i want to show only 5 records in a page...

          SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

          S 1 Reply Last reply
          0
          • C codingrocks

            Its working fine but i want to paginate it... is there any possibility that i want to show only 5 records in a page...

            SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

            S Offline
            S Offline
            Sandeep Akhare
            wrote on last edited by
            #5

            Just google for pagination you will get lot of articles

            Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

            1 Reply Last reply
            0
            • C codingrocks

              I am using a datalist in which i want to bind some data from database on page load.. I am using the following code for doing this...throws an error saying Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Data.DataSet' to 'System.Web.UI.WebControls.DataList' Source Error: Line 29: cmd.CommandType = CommandType.StoredProcedure; Line 30: SqlDataAdapter adpt = new SqlDataAdapter(cmd); Line 31: ds = new DataSet(); Line 32: adapter.Fill(ds); Line 33: conn.Close(); Please help me...?

              SAJAN A PILLAI ASP.NET,C#.NET Programmer dWise Solutions and Services Pvt Ltd. BANGALORE "Winners don't do different things. They do things differently. ...

              M Offline
              M Offline
              Member 4659001
              wrote on last edited by
              #6

              Line 29: cmd.CommandType = CommandType.StoredProcedure; Line 30: SqlDataAdapter adpt = new SqlDataAdapter(cmd); Line 31: ds = new DataSet(); Line 32: adapter.Fill(ds); And Then plz type DataList1.DataSource=ds Datalist1.DataBind() Line 33: conn.Close();

              Raghvendra

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups