Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Get Name of the Control inside Repeater

Thread Tools

Get Name of the Control inside Repeater

Posts: n/a
Hi all,

I have following repeator control with two controls

<asp:repeater id="rptSurvey" runat="server">
<asp:RadioButtonList id="Rd" runat="server">
<asp:ListItem Value="1" >Enable</asp:ListItem>
<asp:ListItem Value="2" >Delete</asp:ListItem>

<asp:LinkButton id="btnUpdate" runat="server">LinkButton</

I need to add client side script on Link Button so if user select
Delete Option and click Link button it must be confirm first.

I am trying to add code on ItemDataBoundEvent

If e.Item.ItemType = ListItemType.Item Then
LinkButton).Attributes.Add("onClick", "return confirm('" &
CType(e.Item.FindControl("Rd"), RadioButtonList).SelectedValue &
End If

My client side script is

<script language="javascript">
function confirm(id)
return false;

But it did not work.

Can anyone please let me know about where I am wrong and how to get
control through client side script inside Repeator Control to do
client side confirmation before updating record?



Reply With Quote

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
Initialization of a Web User Control inside Repeater Control satyajit ASP .Net 2 08-21-2007 03:03 PM
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 ASP .Net 1 08-10-2005 01:58 PM
Can you get the record count inside a repeater control? darrel ASP .Net 1 07-01-2004 06:39 PM