Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Changing user control's content

Reply
Thread Tools

Changing user control's content

 
 
Roshawn
Guest
Posts: n/a
 
      08-19-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Injecting a User Control / Control into a content dynamic content Kurt ASP .Net Web Controls 0 06-13-2007 08:54 PM
Error: "Content controls can only be used in a content page" J.Edwards ASP .Net 0 01-20-2006 11:43 AM
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">? TheKeith HTML 20 10-29-2003 11:56 AM
User changing something on a form makes asp.net take user to login page Raj ASP .Net Security 0 07-09-2003 11:13 PM



Advertisments