Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Repeater Control Question

Reply
Thread Tools

Repeater Control Question

 
 
Roshawn
Guest
Posts: n/a
 
      03-06-2005
Hi,

I have a Repeater control that contains a few web controls. It looks like
this:

<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate><asp:HyperLink id="HyperLink1" runat="Server"
navigateurl="<%# Container.DataItem("address") %>" text="<%#
Container.DataItem("Name") %> /></ItemTemplate>
<SeparatorTemplate>, </SeparatorTemplate>
</asp:Repeater>

I've designed it to work like a pager control. Now whenever a hyperlink is
clicked, I'd like to replace the selected hyperlink with a literal control.
Is there any way to accomplish this task?

Thanks,
Roshawn


 
Reply With Quote
 
 
 
 
Riki
Guest
Posts: n/a
 
      03-06-2005
Roshawn wrote:
> Hi,
>
> I have a Repeater control that contains a few web controls. It looks
> like this:
>
> <asp:Repeater id="Repeater1" runat="server">
> <ItemTemplate><asp:HyperLink id="HyperLink1" runat="Server"
> navigateurl="<%# Container.DataItem("address") %>" text="<%#
> Container.DataItem("Name") %> /></ItemTemplate>
> <SeparatorTemplate>, </SeparatorTemplate>
> </asp:Repeater>
>
> I've designed it to work like a pager control. Now whenever a
> hyperlink is clicked, I'd like to replace the selected hyperlink with
> a literal control. Is there any way to accomplish this task?


If it's only to make it unclickable, set its NavigateUrl property to a blank
string.

--

Riki


 
Reply With Quote
 
 
 
 
quaester
Guest
Posts: n/a
 
      03-09-2005
what I did for my code is to put both the hyperlink control and the literal
control in the ItemTemplate. And I just set the visible attribute accordingly
whenever I don't want any of it to show on client's screen. found this
solution to be short and clean.
btw, remember to replicate all you controls with in itemtemplate to
alternateitemtemplate both are suppose to be the same, it seems that you've
missed that out in your code pasted here.

"Roshawn" wrote:

> Hi,
>
> I have a Repeater control that contains a few web controls. It looks like
> this:
>
> <asp:Repeater id="Repeater1" runat="server">
> <ItemTemplate><asp:HyperLink id="HyperLink1" runat="Server"
> navigateurl="<%# Container.DataItem("address") %>" text="<%#
> Container.DataItem("Name") %> /></ItemTemplate>
> <SeparatorTemplate>, </SeparatorTemplate>
> </asp:Repeater>
>
> I've designed it to work like a pager control. Now whenever a hyperlink is
> clicked, I'd like to replace the selected hyperlink with a literal control.
> Is there any way to accomplish this task?
>
> 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
repeater inside a repeater problem. uncensored ASP .Net 0 10-25-2006 06:10 PM
Repeater inside a Repeater Microsoft ASP .Net Web Controls 0 08-21-2006 09:13 AM
Repeater inside a repeater....how? voidfill3d@yahoo.com ASP .Net 1 08-10-2005 01:58 PM
Repeater Using Javascript Referencing a Column in the Repeater rwoo_98@yahoo.com ASP .Net 0 02-26-2005 05:02 PM
Repeater control with nested repeater chris.reed@digus.com ASP .Net 0 02-11-2005 05:10 PM



Advertisments