Changing user control's content

Discussion in 'ASP .Net Web Controls' started by Roshawn, Aug 19, 2004.

  1. Roshawn

    Roshawn Guest

    Hi All,

    I have created a web user control. This control mimics the numeric pagers
    seen on many online bookstores. I made this user control using the
    Repeater. It is populated dynamically. Here's my code for its
    presentation:

    <asp:Repeater id="Repeater1" enableviewstate="False" runat="server">
    <HeaderTemplate><div id="pager"></HeaderTemplate>
    <ItemTemplate><a href='<%# DataBinder.Eval(Container, "DataItem.Number",
    "Results.aspx?page={0}") %>'
    runat="server"><%# DataBinder.Eval(Container, "DataItem.Number")
    %></a></ItemTemplate>
    <FooterTemplate></div></FooterTemplate>
    </asp:Repeater>

    Using its code-behind file, the control is bound to the data of choice.
    When this control is placed on a webform, it does as expected. Everything
    works fine and dandy.

    However, when I click on one of the anchors, I'd like the selected anchor's
    href property to be empty (to prevent further clicking on it until another
    anchor is selected). I've noticed that settting the href property to "" or
    "#" still allows the anchor to be clicked. This is the only functionality
    that is missing from my user control. Could someone please tell me how to
    accomplish this?

    Thanks,
    Roshawn
     
    Roshawn, Aug 19, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samridhi Kumar Shukla
    Replies:
    1
    Views:
    538
    Alvin Bruney
    Nov 30, 2003
  2. Mad Scientist Jr
    Replies:
    0
    Views:
    674
    Mad Scientist Jr
    Mar 22, 2006
  3. hazz
    Replies:
    6
    Views:
    50,026
    SkyUCHC
    Jun 9, 2010
  4. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    580
    Jonathan Wood
    Feb 2, 2010
  5. Kurt
    Replies:
    0
    Views:
    204
Loading...

Share This Page