I've got a user list on the left side of my page in a datagrid and I want to load a div in the right side of my page with the clicked user's information. I assume I'll do the load of the div in the itemcommand event, but how do I handle page load then? Do I need to know what caused the postback? Do I need to reload the grid on page_load ...
OK, I've used repeaters literally hundreds of times without problems but something has gone awry today. I have a repeater and I'm subscribing to the itemCommand event, but when my command runs, the page posts back but the event isn't fired.
To get around this I'm having to do my databinding on each postback.
My repeater looks like thi...
I want to add a value to a row in a datalist.
I have added a textbox and a LinkButton that shows up when the DataList is in edit mode.
The LinkButton has CommandName="Add" and CommandArgument with the id of the row as a value.
I have added a OnItemCommand to the DataList and in the code behind.
But when try to retrieve the text from t...
I have a project with a simple nested repeater. When i click the button, the OnItemCommand event is not called but the OnItemCreated is called (however, it does not call the Page_Load event handler). What am I misssing?
MARKUP
<table width="100%">
<tr>
<td>my row</td>
<td>my description</td>
</tr>
<asp:Rep...
Why would a button inside a Repeater not fire the Repeater's ItemCommand event? Is there a way to force it to do so? ViewState is Enabled.
In the code below, btnApprove and btnDelete are the buttons in question:
<asp:Repeater runat="server" ID="rpt1" onitemdatabound="rpt1_ItemDataBound" onitemcommand="rpt1_ItemCommand" >
<ItemTempl...
I have a repeater with a literal, a dropdown list, and a button.
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="rep_ItemDataBound" onitemcommand="Repeater1_ItemCommand">
<ItemTemplate>
<div class="buypanel">
<ul>
<li>Choose finish <asp:DropDownList ID="ddlFinish" runat="server"></asp...
Hi,
I have the following implementation:
As you can see I have a repeater (listing the Machines) and a nested repeater (listing the WindowsServices inside each Machine). For each Windows Service I can perform an action using a button. However, to perform this action I need to know which Machine and which WindowsService are concerned....
As the itemcommand event fires after most if not all page/control init/load events. what is the best way to persist session variable data that is modified on itemcomment (adding items for example) so that the page can react to the itemcommand using the modified session?
...
I have a Repeater that generates a list of LinkButtons. Each LinkButton has a distinct CommandArgument value. For various reasons I need to check the CommandArgument value in my Page_Load code (if Page.IsPostBack), i.e. before the OnItemCommand event where it would usually be checked.
I have tried accessing the __eventtarget and __event...
This has been driving me crazy for 2 days now - hope someone has seen this before.
I have this issue where the first click of a control within a repeater or grid view fails to fire the ItemCommand event, all subsequent clicks work. The controls are being loaded into a placeholder on Base.aspx like so
private void LoadUserControl()
...