Changing user control's content

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top