ASP.NET: Repeater Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ryan007
    New Member
    • Jan 2008
    • 4

    #1

    ASP.NET: Repeater Control

    Hi, I am working on webform(VB.Net) . I need some help.

    Database: Column1
    Title
    Descptionxxxx
    URL

    I want to display the records as follows:

    Title URL
    Descptionxxxxxx xxxxxxxxxxxxx
    xxxxxxxxxxxxxxx xxxxxxxxxxxx

    I am using Repeater control. Is there any better way to do it, please suggest.

    Thx
    Ryan
    Last edited by ryan007; Jan 15 '08, 03:18 PM. Reason: Title
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Will there be more than one of these datatables shown on a page at one time? If so then I think a repeater is the way to go. Inside of your repeater you have several ways to display this data in the format that you need. You can create a datatable in the code behind and add the data for each row. Or you could use a datagrid or gridview with one Template column that uses labels to display the data in the format that you need. I have done what you are wanting to do using a datagrid and it works nicely. Give this a try and let me know if you run into any problems.

    Nathan

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by ryan007
      Hi, I am working on webform(VB.Net) . I need some help.

      Database: Column1
      Title
      Descptionxxxx
      URL

      I want to display the records as follows:

      Title URL
      Descptionxxxxxx xxxxxxxxxxxxx
      xxxxxxxxxxxxxxx xxxxxxxxxxxx

      I am using Repeater control. Is there any better way to do it, please suggest.

      Thx
      Ryan
      I'm really not sure what you are trying to do here...
      Do you have table that looks like:
      Database: Column1
      Title: Column2
      Descptionxxxx: Column3
      URL:Column4

      Are you generating a table using a repeater?
      Could you please provide more details on what you are doing.
      I think you're going to want to look into the GridView object (if you're displaying data in a table format...)

      -Frinny

      Comment

      • ryan007
        New Member
        • Jan 2008
        • 4

        #4
        Originally posted by nateraaaa
        Will there be more than one of these datatables shown on a page at one time? If so then I think a repeater is the way to go. Inside of your repeater you have several ways to display this data in the format that you need. You can create a datatable in the code behind and add the data for each row. Or you could use a datagrid or gridview with one Template column that uses labels to display the data in the format that you need. I have done what you are wanting to do using a datagrid and it works nicely. Give this a try and let me know if you run into any problems.

        Nathan

        There is only one database on a page. I tried few ways. My problem is, all this data from one column, it is like set of records. Each set should be like this.

        Title1 URL1
        Description1 XXXXXXX

        Title2 URL2
        Description2 XXXXXXX


        (Title, URL,Description XXXXXXX) are records in the database. i was able display them like this

        Title
        URL
        Descption......

        Thanks for the help.

        Ryan

        Comment

        • ryan007
          New Member
          • Jan 2008
          • 4

          #5
          Originally posted by Frinavale
          I'm really not sure what you are trying to do here...
          Do you have table that looks like:
          Database: Column1
          Title: Column2
          Descptionxxxx: Column3
          URL:Column4

          Are you generating a table using a repeater?
          Could you please provide more details on what you are doing.
          I think you're going to want to look into the GridView object (if you're displaying data in a table format...)

          -Frinny

          No,

          Title, URL, Descptionxxx all are 3 diff. records from 1 column. I want to display them like

          Record1 Record2
          Record3........ ....

          Record4 Record5
          Record6........ ...

          Comment

          • nateraaaa
            Recognized Expert Contributor
            • May 2007
            • 664

            #6
            Your last post confuses me. Could you show us a sample of 2 or 3 records from your database table? Then show us what format you would like the data to be in using data from your sample records.

            thanks
            Nathan

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Originally posted by nateraaaa
              Your last post confuses me. Could you show us a sample of 2 or 3 records from your database table? Then show us what format you would like the data to be in using data from your sample records.

              thanks
              Nathan
              Also, could you post an example of your exact output...

              Comment

              Working...