SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 46
  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article Discussion

    This is an article discussion thread for discussing the SitePoint article, "Using the ASP.NET Repeater Control"

  2. #2
    Nimesh
    SitePoint Community Guest
    Good example of creativity

  3. #3
    Howling Mad Wilger
    SitePoint Community Guest
    Very good article, but I had to remove the outer quotation marks from the 'NavigateURL' part of the HyperLink tag. Otherwise worked excellently.

  4. #4
    CNatra
    SitePoint Community Guest
    Buen ejemplo. Me servirá para impartir clase
    Gracias

  5. #5
    Anonymous
    SitePoint Community Guest
    really very good helpful for beginners

  6. #6
    Zanthor
    SitePoint Community Guest
    Wooo. Finally cleared this up for me, I've fought with these for far too long! Not that it's that hard, but I've been running PHP and it's quite a different style of programming.

  7. #7
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    NY, USA
    Posts
    712
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Repeaters are cool, no doubt, as are datagrids and datalists.
    Databinding in .NET is a real pleasure, Makes life easy compared to procedural scripting languages such as PHP or old classic ASP.

    But this bit I really don't understand:

    private void Page_Load(object sender, System.EventArgs e)
    {
    SqlConnection conDotNet = new SqlConnection
    "Server=xxxxxxx;UID=xxxx;PWD=xxxxx;Database=DotNetGenius");
    string sSQL = "Select sub_category_id, sub_category_text
    from Sub_Category";
    SqlCommand cmd = new SqlCommand(sSQL, conDotNet);
    conDotNet.Open();
    SqlDataReader dtrCat = cmd.ExecuteReader();
    catlist.DataSource = dtrCat;
    catlist.DataBind();
    }
    Your'e exposing your database connection object through every single page? Wouldn't you want to centralize and reuse that object in a class for reasons I shouldn't have to review here?

    Also if using MS-SQL Server... why wouldn't you use functions that call stored procedures and return an sqldatareader (as part of the database class), instead of sending raw SQL strings from random pages to the database?

    Maybe I'm nitpicking and maybe you illustrated in this way for simplicity's sake. But to me that's just bad practice.

  8. #8
    jodybannon
    SitePoint Community Guest
    I think the reason he demo'd this with inline SQL was for simplicity sake.
    I'm not sure about 'best practices' (there are plenty of opinions about that subject), but my web apps mainly use stored procedures to query the database and the connection string is stored in the web.config file and referenced when needed.

  9. #9
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    NY, USA
    Posts
    712
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jodybannon
    I think the reason he demo'd this with inline SQL was for simplicity sake.
    I'm not sure about 'best practices' (there are plenty of opinions about that subject), but my web apps mainly use stored procedures to query the database and the connection string is stored in the web.config file and referenced when needed.
    Same here. And that's what I think too.

    I see so many examples like that - I had to ask just once!

  10. #10
    sanket
    SitePoint Community Guest
    how can i connect data to asp.net and vb.net using oracle 8i using coding?

  11. #11
    Non-Member SoonToBeGood's Avatar
    Join Date
    Mar 2005
    Location
    United States
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice article!

    I've been wanting to use a repeater control for some time, and have read a few books about it but never understood just how it worked.

    This was a very simple example so it was easy to understand. Now I know why they call it the repeater control.

    Reguards.

  12. #12
    Fred
    SitePoint Community Guest
    I get a 'Could not open in Design view. Quote values differently inside a '<%... values %>' block

    i have written it as you have displayed it but i use VB-code in code behind. do you think it can make a differense in what type of programing language i use?

  13. #13
    Hevuss
    SitePoint Community Guest
    The quotes around a <%...%> need to be ' - apostrophes.
    navigateurl='<% DataBinder.Eval(Container.DataItem,"Sub_Category_ID")%>" %>'

  14. #14
    Non-Member eddiegnt's Avatar
    Join Date
    Apr 2004
    Location
    El Paso
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After tinkering with the Repeater Control, I think this is the best way to display data in html.

  15. #15
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    NY, USA
    Posts
    712
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by eddiegnt
    After tinkering with the Repeater Control, I think this is the best way to display data in html.
    I thought so too, until I started using datagrids. I now try to avoid the use of repeaters whenever possible. Once I got a good taste of both... I much prefer datagrids. That's just me, they both have their purposes.

  16. #16
    lalu
    SitePoint Community Guest
    Its not cool :(

  17. #17
    shaymaa
    SitePoint Community Guest
    i would like to know how to access values of the repeater controls

  18. #18
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by shaymaa
    i would like to know how to access values of the repeater controls

    be a little more specific and please give a code exmaple of what it is that you want to access.

  19. #19
    vipin
    SitePoint Community Guest
    how to add dropdownlist in web.ui.webcontrols.table

  20. #20
    Umesh Bhavsar
    SitePoint Community Guest
    This information is vey handy and can be easily understood even by a laymen. Thank you vey much.

  21. #21
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Simple and clear example is great. Tnx.

  22. #22
    Arun Koslia
    SitePoint Community Guest
    Hi !
    Thin information for repeater control covers the whole concept. thanks a bunch!

  23. #23
    hanamichi
    SitePoint Community Guest
    I use control Repeater. In repeater, i use control Textbox, i want to get value Textbox?

  24. #24
    Darth Vader
    SitePoint Community Guest
    how about paging in repeater control?

  25. #25
    Crypth
    SitePoint Community Guest
    Funny enough, it seems .NET doesn't allow dynamic data in the servertag <asp:HyperLink> neither within the "Text" attribute nor "NavigateUrl" .. have you come across this problem aswell?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •