473,698 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error setting headerimageurl in asp:TemplateCol umn

Hi guys,
i have the following code in Datagrid:
<asp:TemplateCo lumn HeaderText="Del ete"
headerImageUrl= ../../Images/i.p.delete.gif" >
<ItemTemplate >
<asp:CheckBox ID=Chk1 Enabled="True" runat="server" />
</ItemTemplate>
</asp:TemplateCol umn>

when i run the page, i get the following error:

System.Web.UI.W ebControls.Data GridColumnColle ction must have items of type
'System.Web.UI. WebControls.Dat aGridColumn'. 'ItemTemplate' is of type
'System.Web.UI. HtmlControls.Ht mlGenericContro l'.

Can someone tell me whats wrong and how to fix it?

Thanks
Manny

Nov 18 '05 #1
1 1519
Your missing the opening double quote on headerImageUrl attribute.

<asp:TemplateCo lumn HeaderText="Del ete"
headerImageUrl= "../../Images/i.p.delete.gif" >

-Chris

"Manny Chohan" <Ma*********@di scussions.micro soft.com> wrote in message
news:56******** *************** ***********@mic rosoft.com...
Hi guys,
i have the following code in Datagrid:
<asp:TemplateCo lumn HeaderText="Del ete"
headerImageUrl= ../../Images/i.p.delete.gif" >
<ItemTemplate >
<asp:CheckBox ID=Chk1 Enabled="True" runat="server" />
</ItemTemplate>
</asp:TemplateCol umn>

when i run the page, i get the following error:

System.Web.UI.W ebControls.Data GridColumnColle ction must have items of type
'System.Web.UI. WebControls.Dat aGridColumn'. 'ItemTemplate' is of type
'System.Web.UI. HtmlControls.Ht mlGenericContro l'.

Can someone tell me whats wrong and how to fix it?

Thanks
Manny

Nov 18 '05 #2

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

Similar topics

1
2078
by: Das | last post by:
Hi All I'm using Temple column in Asp.Net if works fine, but I directly want to set the checked property. With Text Property: it works fin <asp:TemplateColumn HeaderText="Red Flag"><ItemTemplate><asp:CheckBox Text= '<%# DataBinder.Eval(Container.DataItem, "strRedFlag") %>' runat="server"/></ItemTemplate></asp:TemplateColumn I want to set lik In the code below I'm setting the Checked property <asp:CheckBox checked=> instead of Text...
1
4493
by: Stephen | last post by:
I have the following asp:checkbox as a row in my datagrid. and im trying to write code on the onCheckedChanged event of it. The code im trying to write is incorrect as im getting build errors. What im trying to do is populate a label on my aspx page with the contents of the row in the database which I have checked. When I uncheck the checkbox I want the label to be set to blank so as it can be populated again when another checkbox in the...
0
1221
by: Tim::.. | last post by:
I keep getting the following error on a dropdownlist control I have added to a datagrid! I have given the control the correct id and don't get any errors when conpiling the code but as soon as I try to access the page I receive the error show below! Can someone please tell me why and how I might fix it! Thanks! ERROR: Object reference not set to an instance of an object. ...::INLINE CODE
5
1589
by: Patrick.O.Ige | last post by:
What could cause the error:- System.NullReferenceException: Object reference not set to an instance of an object. Any ideas?
1
1635
by: Patrick Olurotimi Ige | last post by:
I want to add a HeaderText="Subject" and HeaderImageUrl="" to a Datagrid but it seems it doesn't work! It seems If i specify both header text and a header image, the header image takes precedence!!! Any ideas how i could dislpay both at the same time Sample below!! <Columns> <%-- Manipulate the subject entry so that it contains a link to the reply page --%> <asp:TemplateColumn HeaderText="Subject"
3
1574
by: tjonsek | last post by:
am working on code that will allow users to update data within the datagrid. I have come across a few problems, some of them I have been able to work out, but this last one is giving me trouble. When a user clicks the edit button, I get an error 'Specified Cast Not Valid'. The code that generates the error is: Dim strCompleted As String = CType(e.Item.Cells(6).Controls(1), TextBox).Text
2
10399
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat actually happens is... when the Text size is too big... the column
0
1226
by: Rocky | last post by:
Dear ALL, I am facing a bit problem in DATAGRID. so may be you guys can help me out. Actually on a DataGrid I am having following controls: 1) 2 DropDown Menu 2) 1 Text Box 3) 1 ADD Button 4) 1 Remove Button So these all controls are in 1 row and looks like:
3
7376
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif" HeaderText="ID" SortExpression="PID"> <ItemTemplate> <asp:Label ID="lblPID" Text=<%# Container.DataItem("PID") %> runat="server"/>
0
8674
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8893
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
5860
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.