473,569 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cannot have children of type 'DataBoundLiter alControl'

I am using the DataList
The ItemTemplate has a button and a label. The label field is bound to
a datatable and a field called "Narrative" . The button is labeled
"Edit". When the edit button is clicked, the edit Template displays a
number of buttons and it attempts to display that "Narrative" in a text
box, allowing the user to edit the text of the narrative.

When I run and press the "Edit", the system stops in the Edit Template
and highlights the "Narrative" text box control and gives me the
following error message "System.Web.Htt pException: 'TextBox' cannot have
children of type 'DataBoundLiter alCont".

Why does it not like me using the same field again with a textbox
control?
Here is my itemTemplate

<ItemTemplate >
<asp:Button Text="Edit" CommandName="Se lect" Runat="server">
</asp:Button>
&nbsp;<asp:Labe l ID="lblDesc" Runat="server">
<%# DataBinder.Eval (Container.Data Item, "Narrative" ) %>
</asp:Label>

</ItemTemplate>

Here is my EditTemplate

<EditItemTempla te>
<asp:Button CommandName="Up date" Text="Update" Runat="server">
</asp:Button>
<asp:Button CommandName="De lete" Text="Delete" Runat="server">
</asp:Button>
<asp:Button CommandName="Ca ncel" Text="Cancel" Runat="server">
</asp:Button><br>
Sequence
<asp:TextBox><% # DataBinder.Eval (Container.Data Item,"Seq")%>
</asp:TextBox>
Bullet Type
<asp:DropDownLi st Runat="server">
<asp:ListItem>H eader</asp:ListItem>
<asp:ListItem>B ullet</asp:ListItem>
</asp:DropDownLis t>
&nbsp;
***** This is where it bombs off *************** *******
<asp:TextBox Runat="server" ID="txtNarrativ e">
<%# DataBinder.Eval (Container.Data Item, "Narrative" ) %>
</asp:TextBox>
</EditItemTemplat e>
Nov 18 '05 #1
0 1807

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

Similar topics

6
14547
by: Tim Cartwright | last post by:
I have a page that has the login control on it, nothing else. This page inherits from a master page, neither page has any code in it. This page works perfectly when running on the WebDev debug web server. I am able to log in. However after publishing the page to my local IIS, it results in the below error. This error is occurring on the Visual...
2
8616
by: Sharon | last post by:
Hi all. I have a console app which is a remoting server. When trying to access the server using console app client, it works fine. But when i try the same client code from aspx page on iis i get this: RemotingException: Cannot load type Any ideas? Thanks, Sharon.
2
14789
by: Paul Hemans | last post by:
I am very new at .Net. I have a small project where I need to manipulate the contents of a web page. I have a form with a web browser control (webBrowser1) on it. Within the webBrowser1_DocumentCompleted method I have the following code. mshtml.HTMLDocument oDoc = new HTMLDocumentClass(); oDoc = (mshtml.HTMLDocument)webBrowser1.Document;
2
5003
by: keithb | last post by:
A web site published from its development environment (VS Web Server) to an IIS 6.0 site displays this message: Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login' Anyone have an idea about the cause? Thanks,
2
17113
by: Marcelo Muzilli | last post by:
Howdy all, in my program, I have a ushort variable and a string variable and if I try to compile it, I'm receiving this error message: "Cannot convert type 'string' to 'ushort'". How can I compare both? Example:
6
30141
by: John | last post by:
The following code: int test = 1; bool isTrue = (bool)test; results in a compiler error: Cannot convert type 'int' to 'bool' wtf, any ideas on how to work around this?
1
8186
by: niharnayak2003 | last post by:
Hi All, I am facing the problem in Typecast inside the Generic class. I need a function which will take two param 1:-Xpath 2:- XMLDOC and return me what i will need. here is the code for accessing to the Generic class. private double mtrxgraphdata; private XMLdocument Matrixdata;
2
10247
by: Paulo | last post by:
DataRow dr = (DataRow)ds.Tables.Rows.ItemArray; Error 1 Cannot convert type 'object' to 'System.Data.DataRow' C:\Documents and Settings\Fabio\Meus documentos\Visual Studio 2005\Projects\CodBarraPalm\CodBarraPalm\Default.aspx.cs 35 26 CodBarraPalm ? why this error trying to get the contents of a row on a DataSet?
2
4664
by: nomad | last post by:
Hi, When trying to serialize a class I keep getting the message below. optionalExtensionTypeOptionalExtension is not mandatory so not sure why this is appearing. If anyone has seen this type of error before and found a way around it, it would be greatly appreciated. error CS0030: Cannot convert type
3
21632
by: abhijit mudugan | last post by:
i'm getting an error 'identifier display cannot have type qualifier' near the bold portion. what's wrong??? #include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> class matrix { private: int a,m,n; public: void getdata();
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
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
7964
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...
1
5504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
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
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2107
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 we have to send another system
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
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.