473,769 Members | 5,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unexpected end of file looking for </HeaderTemplate>

CJM
I've copied (& modified) some code from MSDN which uses a Repeater control,
but I'm getting an error: Unexpected end of file looking for
</HeaderTemplate>

As far as I can see I've not made an dramatic changes, and if the MSDN code
would work, I would also expect mine to work.

As far as the </HeaderTemplate> tag is concerned, I removed it and replaced
it - but it did not appear in the Intellisense list.

I've included both the html & code snippets below.

Any help would be appreciated.

Chris

Snippets:

<form id="frmReport" method="post" runat="server">
<table id="tblRequest " class="tbl centered" cellspacing="0"
runat="server">
<tr>
<th colspan="2">
View TA Details</th>
</tr>
<tr>
<td>TA Number:</td>
<td><asp:TextBo x ID="txtTANumber " MaxLength="10" Runat="server" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><asp:Butt on ID="cmdSearch" Text="Search" Runat="server" /></td>
</tr>
</table>

<asp:Repeater id=rpResults runat="server">
<HeaderTemplate >
<table id="tblResults " class="tbl centered" cellspacing="0"
runat="server">
<tr>
<th>TA Number:</th>
<th><%# DataBinder.Eval (Container, "DataItem.TANum ber") %></th>
</tr>
</HeaderTemplate>
<ItemTemplate >
<tr>
<td>PO Number:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PONum ber") %></td>
</tr>
<tr>
<td>PO Line:</td>
<td><%# DataBinder.Eval (Container, "DataItem.POLin e") %></td>
</tr>
<tr>
<td>Part No:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PartN umber") %></td>
</tr>
<tr>
<td>Part XRef:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PartX ref") %></td>
</tr>
<tr>
<td>Description :</td>
<td><%# DataBinder.Eval (Container, "DataItem.DescT ext") %></td>
</tr>
<tr>
<td>Quantity Rec'd:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Quant ityRecd") %></td>
</tr>
<tr>
<td>Advice Note:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Advic eNote") %></td>
</tr>
<tr>
<td>Supplier ID:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Suppl ierID") %></td>
</tr>
<tr>
<td>Cert/Cast No:</td>
<td><%# DataBinder.Eval (Container, "DataItem.CastN o") %></td>
</tr>
<tr>
<td>Date Rec'd:</td>
<td><%# DataBinder.Eval (Container, "DataItem.DateR ecd") %></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:Repeater>
</form>

Public Class viewta2
Inherits System.Web.UI.P age

Protected WithEvents tblRequest As HtmlTable
Protected WithEvents tblResults As HtmlTable
Protected WithEvents cmdSearch As System.Web.UI.W ebControls.Butt on
Protected WithEvents rpResults As System.Web.UI.W ebControls.Repe ater
Protected WithEvents txtTANumber As TextBox
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here

Dim oConn As SqlConnection
Dim oCmd As SqlCommand
Dim dtrTADetails As SqlDataReader

If IsPostBack Then
'Hide Search button
tblResults.Visi ble = True
tblRequest.Visi ble = False

oConn = New SqlConnection(A pplication("DB" ))
oCmd = New SqlCommand("Exe c TA_GetTADetails " & txtTANumber.Tex t, oConn)
oConn.Open()

With rpResults
.DataSource = oCmd.ExecuteRea der()
.DataBind()

End With

oConn.Close()
Else
'Hide(results)
tblResults.Visi ble = False
tblRequest.Visi ble = True
End If

End Sub

End Class

Nov 18 '05 #1
1 7645
Your controls aren't closing in the same order you are opening them

<headerTemplate >
<table runat="server"> ...
</headerTEmplate>

You need to either close the </table> inside the headerTemplate or remove
the runat="Server"

Karl

"CJM" <cj*******@news groups.nospam> wrote in message
news:eT******** ******@TK2MSFTN GP09.phx.gbl...
I've copied (& modified) some code from MSDN which uses a Repeater control, but I'm getting an error: Unexpected end of file looking for
</HeaderTemplate>

As far as I can see I've not made an dramatic changes, and if the MSDN code would work, I would also expect mine to work.

As far as the </HeaderTemplate> tag is concerned, I removed it and replaced it - but it did not appear in the Intellisense list.

I've included both the html & code snippets below.

Any help would be appreciated.

Chris

Snippets:

<form id="frmReport" method="post" runat="server">
<table id="tblRequest " class="tbl centered" cellspacing="0"
runat="server">
<tr>
<th colspan="2">
View TA Details</th>
</tr>
<tr>
<td>TA Number:</td>
<td><asp:TextBo x ID="txtTANumber " MaxLength="10" Runat="server" /></td> </tr>
<tr>
<td>&nbsp;</td>
<td><asp:Butt on ID="cmdSearch" Text="Search" Runat="server" /></td>
</tr>
</table>

<asp:Repeater id=rpResults runat="server">
<HeaderTemplate >
<table id="tblResults " class="tbl centered" cellspacing="0"
runat="server">
<tr>
<th>TA Number:</th>
<th><%# DataBinder.Eval (Container, "DataItem.TANum ber") %></th>
</tr>
</HeaderTemplate>
<ItemTemplate >
<tr>
<td>PO Number:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PONum ber") %></td>
</tr>
<tr>
<td>PO Line:</td>
<td><%# DataBinder.Eval (Container, "DataItem.POLin e") %></td>
</tr>
<tr>
<td>Part No:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PartN umber") %></td>
</tr>
<tr>
<td>Part XRef:</td>
<td><%# DataBinder.Eval (Container, "DataItem.PartX ref") %></td>
</tr>
<tr>
<td>Description :</td>
<td><%# DataBinder.Eval (Container, "DataItem.DescT ext") %></td>
</tr>
<tr>
<td>Quantity Rec'd:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Quant ityRecd") %></td>
</tr>
<tr>
<td>Advice Note:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Advic eNote") %></td>
</tr>
<tr>
<td>Supplier ID:</td>
<td><%# DataBinder.Eval (Container, "DataItem.Suppl ierID") %></td>
</tr>
<tr>
<td>Cert/Cast No:</td>
<td><%# DataBinder.Eval (Container, "DataItem.CastN o") %></td>
</tr>
<tr>
<td>Date Rec'd:</td>
<td><%# DataBinder.Eval (Container, "DataItem.DateR ecd") %></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:Repeater>
</form>

Public Class viewta2
Inherits System.Web.UI.P age

Protected WithEvents tblRequest As HtmlTable
Protected WithEvents tblResults As HtmlTable
Protected WithEvents cmdSearch As System.Web.UI.W ebControls.Butt on
Protected WithEvents rpResults As System.Web.UI.W ebControls.Repe ater
Protected WithEvents txtTANumber As TextBox
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here

Dim oConn As SqlConnection
Dim oCmd As SqlCommand
Dim dtrTADetails As SqlDataReader

If IsPostBack Then
'Hide Search button
tblResults.Visi ble = True
tblRequest.Visi ble = False

oConn = New SqlConnection(A pplication("DB" ))
oCmd = New SqlCommand("Exe c TA_GetTADetails " & txtTANumber.Tex t, oConn) oConn.Open()

With rpResults
.DataSource = oCmd.ExecuteRea der()
.DataBind()

End With

oConn.Close()
Else
'Hide(results)
tblResults.Visi ble = False
tblRequest.Visi ble = True
End If

End Sub

End Class


Nov 18 '05 #2

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

Similar topics

2
3231
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are writing one object in C# which will take the entire table tag contents and renders. Ie., we need to pass "<table>………… <thead>……</thead>. <tr>.<td> <td>..<tr>.<td> <td> </table>" content to
2
10568
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
0
1508
by: sharpener | last post by:
I'm new to C# and to newsgroups, so please bear with a possibly foolish query. I'll try to be sensible. The results of /// <summary> ... </summary> etc. appear immediately in the Object Browser, as advertised. But when I try to get the same result with /// <include> ..., no joy. Having spent the better part of 2 days in a textbook-help-and-msdn search, I'm stumped, so I've isolated the problem in a solution consisting of nothing...
10
3087
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page code and my code behind code... ===============
2
1299
by: Kim | last post by:
I had no problem with compiling my webpage with the following statement added to the HTML view until recently: <asp:repeater id="rp1" runat="server"> <tr><td><%# DataBinder.Eval(Container.DataItem, "Title") %></td></tr> ........... ........... </asp:repeater> The intellisense indicating the above-mentioned error occured on every line
3
3109
by: André | last post by:
Hi, I put that question already, but it's still not very clear to me, so ... Assume following option in web.config= debug="false" but in one aspx page (test.aspx) <%@ debug="true" ..%>
4
9087
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image file should not be saved locally before uploading. It should not be visible any <input type=file on the form. How can it be done? I'm working on a project where client javascript requests an image server to generate dynamic images. The client...
3
3381
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
14
3160
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the PHP interpreter works like any other, that is, it first expands all the include files, and then parses the resulting text. Can anyone help with an explanation? Thanks, M. McDonnell
0
9583
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
9423
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
10039
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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,...
1
7406
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5297
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...
1
3955
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
2
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
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.