Ask a Question related to ASP.NET General, Design and Development.
-
Joel Cade #1
Client Script emitted from a Repeater Item Control
I'm using a repeater to show the rows in a data table. I'd like the
have a link button beside each row that removes the record, firing a
client script function to prompt the user for confirmation, and then
run as a server control. I know how to attach client script to a
server control, but I'm not sure how to access the control of the
repeater item. Code follows:
<ItemTemplate>
<tr class="font8v">
<td><%# DataBinder.Eval(Container.DataItem, "FileName")
%></td>
<td><%# DataBinder.Eval(Container.DataItem, "Size"))%></td>
<td><asp:LinkButton id="btnOne" runat="server" Text="Remove"
CommandArgument='<%#DataBinder.Eval
Container.DataItem,"FileName")%>' ></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
To add client script to a button, I'd do the following:
btnOne.Attributes.Add("onclick", "javascript:confirmRemove")
How do I programmatically do this to the repeater Item?
Thanks in advance for any help!!
Joel Cade Guest
-
attaching client script to toolbar button control...
Hello, I am sick and tired of ochestrating server and client side scripts. Basically I am using toolbar from IE web controls and want to attach... -
Client-Side Script for CheckBox Web Control
I'm trying to create a server Web control that renders as a checkbox that has an OnClick event associated with it. I've created a short proof of... -
Can client-side script be included in a user control (ascx)?
I am creating a simple usercontrol (.ascx). There is some client-side functionality I would like it to have. I tried adding in a Script element,... -
Calling Method When Item Selected in Repeater
I have a repeater that consists of a column of data. When the user selects an individual item, I need to execute a method in the codebehind that... -
ITC - urgent!!!I'd like to transmit binary data from SQL server to client and load it into variable. I used for this Microsoft Internet Transfer Control and my script looks like this:
I'd like to transmit binary data from SQL server to client and load it into variable. I used for this Microsoft Internet Transfer Control and my...



Reply With Quote

