How do I control one control from another control?
I have a page page1.aspx which is within a master page.
On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed.
Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all.
Is there a good article or someplace I can find some information on how to do this?
AllAboutFocus.com. Information Technolo...refering to controls in a repeater control
(this is an example situation)
I have a repeater control which displays a textbox.
As the repeater control is 'run' when the page is loaded. I'd like to give a unique id to each textbox.
ie: name1, name2, name3, name4 etc. And I'd also like to store the number of times the repeater control is 'iterated' through.
I imagine the best way to store the number of times is to either return a values with my select query (Stored Procedure), or to increment a cached int each time I run through the repeater control.
How would I assign a 'unique' id to each textbox?
...Get control in repeater control
I want to use HtmlControls.HtmlTableCell in repeater control but i cant not access it, in my table in Repeater Control, i have 2 "td" which on page_load, i want to show only 1 of them depend on condition given. But i cant do it.
This is my code :
<asp:repeater id="repeaterViewNew" runat="server"> <HeaderTemplate> <table width="100%" cellpadding="1" cellspacing="1"> &...Repeater control in a composite control...
How do I put a repeater control in a composit control. Currently, I putting textbox, dropdowns, etc.
There is a very small different between the dropdownlist and repeater if both of then are databound. Basically, all you need to cater for is databinding of the Repeater during the databinding of your composite control
BugBug [MCSD]...how to radiobuttonlist control in repeater control?
I tried this code for nested repeater control.
The following code is working fine. Only the thing is I want radio buttons instead of bullet points.Could any one help me in that?
In reapeater.aspx<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="repeater.aspx.cs" Inherits="repeater" Title="Untitled Page" %>
<%@ Import Namespace="System.Data" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentP...Responding to control in Repeater Control
I'm attempting to respond to events by a
dropdownlost/checkbox/radiobutton and I am having trouble getting the
code to do this to work.
For the aspx file I have tried setting the function to call in the
dropdownlist in the OnSelectedIndexChanged property yet. That causes
the module to have an unhandled error when I attempt to view it.
This also happens when I put it in the repeater controls OnItemCommand="SetNewUpline", the module becomes unloadable.
My function looks like
private void SetNewUpline(object sender, RepeaterCommandEventArgs e)
...select control in a repeater control
I have a repeater control which data are selected that way: Strsql = "SELECT T_PRODUIT.NO_PRODUIT, T_PRODUIT.UNITE, T_PRODUIT.NO_CATEGORIE, T_PRODUIT.NO_CSBE,T_PRODUIT.NOUVEAU,T_PRODUIT.ID_PRODUIT, " & _
"CASE WHEN IMAGE IS NULL THEN 'Aucun.gif' ELSE IMAGE END AS IMAGE1, T_PRODUIT.NOM, " & _
"T_PRODUIT.DESCR, T_PRODUIT.DETAIL,T_FOURNISSEUR_PRODUIT.NO_FOURNISSEUR_PRODUIT, T_FOURNISSEUR_PRODUIT.PRIX, T_FOURNISSEUR_PRODUIT.PRIX_LISTE, " & _
"T_FOURNISSEUR.NOM as FNOM, T_FOURNISSEUR.NO_F...Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null.
(67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected
UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems");
This is how we Load User controls into a content place holder.
UserCont...Repeat a Repeater Control?
I have a stored procedure that returns one big table with Employee names, phone numbers, and their state. I need to generate different tables (or GridViews, or Repeaters... not sure) for each state. Here's an example:
My table hasID Employee_Name Phone_Number State
I need my web form to look like this:
CaliforniaID Employee_Name Phone_NumberID Employee_Name Phone_NumberID Employee_Name Phone_Num...Calendar Control inside Repeater, Handling Child control events in parent Data Control
Hi all,I've been researching a problem i have for a couple of days now and i'm still not sure how to even start to handle it.I'm essentially trying to build a page that will display custom form fields/controls for individual items/rows inside a repeater.I've got a fairly complex calendar i need to have working inside each individual row of the Repeater. The calendar is set up to fire the following events:
OnDayRender="Calendar2_DayRender" OnSelectionChanged="Calendar2_SelectionChanged" OnVisibleMonthChanged="Calendar2_VisibleMonthChanged"My first question is how do i go about handling these...Data presentation control in another Data presentation control
Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...nesting a datalist control in a repeater control
I need to display a report in the following format:
item one for heading1
item two for heading1
item three for heading1
item one for heading2
item two for heading2
item three for heading2
item one for heading3
item two for heading3
item three for heading3
I have tried use a repeater control for displaying the Headings and a datalist control to display the items for each heading. The problem is that I couldn't nest a datalist control between the repeater's ItemTemplate tag. Any help for nesting A...Custom Control Inside a Repeater Control
I have a repeater control on the main page and would like to load a custom user control inside the repeater control. The custom user control is basically a GridView. A few values will need to be passed to the custom user control to define the where clause for the GridView DataSet. Can anyone provide me with or point me to a simple example of this functionality?Allan Horwitz
Nevermind, I just put a GridView inside the Repeater Control tags and used the OnItemDataBound event to get the variables.Allan Horwitz...How to access a control inside a Repeater control?
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate><li><asp:Image id="Image1" runat="server" /> </li></ItemTemplate>
</asp:Repeater> Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound
Dim Image1 As WebControls.Image Image1 = CType(e.Item.FindCo...