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. BulletedList control

BulletedList control

Scheduled Pinned Locked Moved ASP.NET
databasesysadminsecurity
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.
  • H Offline
    H Offline
    hotthoughtguy
    wrote on last edited by
    #1

    <asp:SqlDataSource ID ="myid" ConnectionString = "server = .\sqlexpress; integrated security = True; database = northwind;" SelectCommand = "select LastName from employees " runat = "server" /> <asp:BulletedList runat="server" DataSourceID = "myid"/> and its output * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView i want it to be LastName not its default ToString();

    S B 2 Replies Last reply
    0
    • H hotthoughtguy

      <asp:SqlDataSource ID ="myid" ConnectionString = "server = .\sqlexpress; integrated security = True; database = northwind;" SelectCommand = "select LastName from employees " runat = "server" /> <asp:BulletedList runat="server" DataSourceID = "myid"/> and its output * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView i want it to be LastName not its default ToString();

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      You are missing DataTextField binding. Specify the control's DataSourceID property. Specify at the very least the required DataTextField. The value of each record in this field will then be displayed as the text of each item in the list. So, you need to do:

      1 Reply Last reply
      0
      • H hotthoughtguy

        <asp:SqlDataSource ID ="myid" ConnectionString = "server = .\sqlexpress; integrated security = True; database = northwind;" SelectCommand = "select LastName from employees " runat = "server" /> <asp:BulletedList runat="server" DataSourceID = "myid"/> and its output * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView * System.Data.DataRowView i want it to be LastName not its default ToString();

        B Offline
        B Offline
        Brij
        wrote on last edited by
        #3

        Also set DataTextField of your BulletedList, because without it,How BulletedList list come knowthat what to show.Use following code

        Let me know if still face problem.

        Cheers!! Brij

        A 1 Reply Last reply
        0
        • B Brij

          Also set DataTextField of your BulletedList, because without it,How BulletedList list come knowthat what to show.Use following code

          Let me know if still face problem.

          Cheers!! Brij

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          The same answer has been posted by Sandeep.

          Cheers ! Abhijit Codeproject MVP

          B 1 Reply Last reply
          0
          • A Abhijit Jana

            The same answer has been posted by Sandeep.

            Cheers ! Abhijit Codeproject MVP

            B Offline
            B Offline
            Brij
            wrote on last edited by
            #5

            Just see the timings when I started replying, no answer was there...

            Cheers!! Brij

            A 1 Reply Last reply
            0
            • B Brij

              Just see the timings when I started replying, no answer was there...

              Cheers!! Brij

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              Hmm... that may be and sometime it's happens too. But that does not mean that you vote the post "1" without any reason (If you voted). :thumbsdown:

              Cheers ! Abhijit Codeproject MVP

              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