473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can I access to controls in footertemplate

Hi,How can I access to checkbox control in footer template of datalist and
fire the selectedchangeindex event?

I try this on DataList_ItemDataBound to find a control int footerIndex = DataList1.Controls[0].Controls.Count-1;
CheckBox d;
d = DataList1.Controls[0].Controls[footerIndex].FindControl("Ch_LiftGround") as CheckBox;
if(d != null)
{
d.AutoPostBack=true;
d.CheckedChanged += new System.EventHandler(this.Ch_LiftGround_CheckedChan ged);
}

but if the footer templete is not in item template like this:

<ItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="Ch_LiftGround" Runat="server" Text="Lift Ground Service" class='caption' AutoPostBack=true ></asp:CheckBox>
</FooterTemplate>
</ItemTemplate>
this code dosent work and if the footer is in daitemtemplate it dosent work exacty right either do you have any idea?
Regards mahsa


Nov 18 '05 #1
0 1199

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1729
by: Keith Harris | last post by:
Hi, I have a Repeater control which is bound to a dataset. In the footer of the repeater control, I have a Button whose visibility I want to vary according to the sum of a column being > 0. ...
1
1229
by: Jorge Loaiza Arango | last post by:
Hi group, When I have TextBox1 in the <ItemTemplate> of Datagrid1, I can to access the propierties using: dim myTBox as TextBox = Datagrid1.Item(row).FindControl("TextBox1") but, if it is...
1
1741
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As...
3
4420
by: mahsa | last post by:
Hi,How can I access to checkbox control in footer template of datalist and fire the selectedchangeindex event? -- Regards mahsa
2
6530
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row...
2
1119
by: Tarun Mistry | last post by:
Hi everyone, a simple problem I hope you guys can help me with. I have a repeater control, within this i would like to place another server control. I.e. <asp:Repeater id="Repeater1"...
7
2522
by: rn5a | last post by:
How can I place a Label control in the FooterTemplate of a DataList control? I tried this <script runat="server"> Sub Page_Load(obj As Object, ea As EventArgs) Dim dblTotal As Double Dim...
6
11058
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
2
1668
by: hp_1981 | last post by:
Hi, Which one has more performance and speed? using dataset and databinding asp.net controls or building string by SqlDataReader ? the following is my two methods: 1. Using SqlDataReader :...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.