R
Roshawn
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
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