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
databasewpfwcftutorial
5 Posts 2 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.
  • N Offline
    N Offline
    n_gchaitra
    wrote on last edited by
    #1

    hi, I am using bulletedlist control and have set displaymode as linkbuttons. And binding data to that. Till here it is working fine. Now when i select some link on that it has to move to some other page. but how to do this i am not able to retrieve the text from the bulleted list. I mean based on the value present in the bulletedlist i need to write the query. But finding difficult since it does not have either a text property or selecteditem property.

    Chaitra N

    M 1 Reply Last reply
    0
    • N n_gchaitra

      hi, I am using bulletedlist control and have set displaymode as linkbuttons. And binding data to that. Till here it is working fine. Now when i select some link on that it has to move to some other page. but how to do this i am not able to retrieve the text from the bulleted list. I mean based on the value present in the bulletedlist i need to write the query. But finding difficult since it does not have either a text property or selecteditem property.

      Chaitra N

      M Offline
      M Offline
      mihirhp
      wrote on last edited by
      #2

      protected void BulletedList1_Click(object sender, BulletedListEventArgs e) { int ind = e.Index; string txt = BulletedList1.Items[ind].Text; }

      N 2 Replies Last reply
      0
      • M mihirhp

        protected void BulletedList1_Click(object sender, BulletedListEventArgs e) { int ind = e.Index; string txt = BulletedList1.Items[ind].Text; }

        N Offline
        N Offline
        n_gchaitra
        wrote on last edited by
        #3

        But since it does not possess navigateurl property, how can i give the link to that?

        Chaitra N

        1 Reply Last reply
        0
        • M mihirhp

          protected void BulletedList1_Click(object sender, BulletedListEventArgs e) { int ind = e.Index; string txt = BulletedList1.Items[ind].Text; }

          N Offline
          N Offline
          n_gchaitra
          wrote on last edited by
          #4

          Thank you. It is working. One more doubt. I am uploading files (.doc,.gif,.excel,etc) and storing in the server. Now I want to open those files when i click the link buttons. But I am able to get only the path but how to open it. what changes i need to the following code? Dim SQLString As String = "SELECT filepath FROM pictures WHERE title = '" & BulletedList1.Items(e.Index).Text & "'" Dim dr As Data.SqlClient.SqlDataReader Dim comm As New Data.SqlClient.SqlCommand(SQLString, dbconn) If dbconn.State <> ConnectionState.Open Then dbconn.Open() End If Dim str As String dr = comm.ExecuteReader While dr.Read str = dr.Item(0) End While dr.Close() TextBox1.Text = str

          Chaitra N

          M 1 Reply Last reply
          0
          • N n_gchaitra

            Thank you. It is working. One more doubt. I am uploading files (.doc,.gif,.excel,etc) and storing in the server. Now I want to open those files when i click the link buttons. But I am able to get only the path but how to open it. what changes i need to the following code? Dim SQLString As String = "SELECT filepath FROM pictures WHERE title = '" & BulletedList1.Items(e.Index).Text & "'" Dim dr As Data.SqlClient.SqlDataReader Dim comm As New Data.SqlClient.SqlCommand(SQLString, dbconn) If dbconn.State <> ConnectionState.Open Then dbconn.Open() End If Dim str As String dr = comm.ExecuteReader While dr.Read str = dr.Item(0) End While dr.Close() TextBox1.Text = str

            Chaitra N

            M Offline
            M Offline
            mihirhp
            wrote on last edited by
            #5

            hi.... sorry for late reply.... here u r selecting filepath in query.... so, .. your data reader will give you only path of that file... if you want to open u need to download on client machine .. at that time it will give option for save or open file.... OR .................. OR ............... OR ............. Use System.IO and using this class create streamreader and read file .... ..... Try ... this.... - Best of work...........

            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