473,566 Members | 3,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a checkbox to a repeater control

Why is this code not allowing me to add a checkbox to it?

<asp:repeater ID="RptTrip" Runat="server" EnableViewState ="false">
<ItemTemplate >
<asp:Checkbox AutoPostBack="T rue" ID="cb" runat="server"
Checked="false" ></asp:Checkbox>
<trip_detail_in fo trip_detail_id ='<%#
Container.DataI tem("trip_detai l_id")%>'
leg_start_dt = '<%# Container.DataI tem("leg_start_ dt")%>'
pickup_iso_dt = '<%# Container.DataI tem("pickup_iso _dt")
%>' />
</ItemTemplate>
</asp:repeater>

I keep getting a "Control 'RptTrip__ctl0_ cb' of type 'CheckBox' must
be placed inside a form tag with runat=server. " message even though I
obviously already have that tag in the control.

Jun 14 '07 #1
1 1896
Never mind. I found it...the xml the repeater code was tied to is not
inside the form tag. If I put it in the form tag it no longer gives
me that error (but it does seem to indicate that xml tag should not be
inside the form tag so I need to delve into this further.

Jun 14 '07 #2

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

Similar topics

2
11781
by: Thomas R | last post by:
Is is possible? In VS.NET 2003, Binding data to the repeater is easy, but when I try to add an ASP:checkbox to the .aspx page, the designer won't recognize it, hence the code view doesn't allow me to access it. The funny thing is that it compiles fine, and the checkboxes are there, I just can't write to them! Is there a way around this...
3
4831
by: Jack Turnbull | last post by:
Hi, I have a Checkbox in a Repeater set to AutoPostBack = true. I have pointed OnCheckedChanged to a Sub but it doesn't fire. If I move the checkbox out of the Repeater it fires! Any ideas? Thanks
2
6399
by: Andrew | last post by:
Hi, I have a problem capturing the checkboxes that are checked, I get false irrespective of wether they are checked or not. I have gone thru the sample code on this forum, but they dun seem to work. This is the code that I used to go thru the repeater control to find my checkboxes. foreach(RepeaterItem r in MyRepeater.Items)
3
3138
by: Fao, Sean | last post by:
I have a DataGrid that I'm adding CheckBox controls to at runtime (in the code behind) and I'm not sure if I'm doing it correctly. First of all, I noticed that the MyDataGrid.Columns.Add() method expects a DataGridColumn so I instantiated an object of type TemplateColumn that I had hoped I could add a CheckBox to. I soon discovered that the...
8
16585
by: Alan Silver | last post by:
Hello, I have a repeater that has code like this... <ItemTemplate> <asp:CheckBox ID="chkDelete" Text="" RunAt="server"/> .... other stuff goes here </ItemTemplate> There is a button below the repeater. When clicked, it is supposed to
2
3704
by: RichardH | last post by:
Hi, I have x number of table rows that all should have a checkbox and a dropdownlist on each row. The checkbox could be checked and the dropdown should contain y number of values that are related to the row. I can't find a good control for this in ASP.Net 2.0. Now I use a repeater and check the checkbox on ItemDataBound, I also fill the...
0
2786
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of chkAll. I simply want to have chkAll be checked if every item in the repeater has its checkbox checked. In the code behind page, I can access the...
0
2259
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of chkAll. I simply want to have chkAll be checked if every item in the repeater has its checkbox checked. In the code behind page, I can access the...
5
24515
by: c_shah | last post by:
using VB.net (2005) ASP.net 2.0 I have a repeater control with the item template, in the item template I have two checkboxes How to capture event When user checks the checkboxes? What event fires on the repeater Repeater Control Item Template
0
7673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.