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:TextBox ID="txtTANumber" MaxLength="10" Runat="server" /></td>
</tr>
<tr>
<td> </td>
<td><asp:Button 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.TANumber") %></th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>PO Number:</td>
<td><%# DataBinder.Eval(Container, "DataItem.PONumber") %></td>
</tr>
<tr>
<td>PO Line:</td>
<td><%# DataBinder.Eval(Container, "DataItem.POLine") %></td>
</tr>
<tr>
<td>Part No:</td>
<td><%# DataBinder.Eval(Container, "DataItem.PartNumber") %></td>
</tr>
<tr>
<td>Part XRef:</td>
<td><%# DataBinder.Eval(Container, "DataItem.PartXref") %></td>
</tr>
<tr>
<td>Description:</td>
<td><%# DataBinder.Eval(Container, "DataItem.DescText") %></td>
</tr>
<tr>
<td>Quantity Rec'd:</td>
<td><%# DataBinder.Eval(Container, "DataItem.QuantityRecd") %></td>
</tr>
<tr>
<td>Advice Note:</td>
<td><%# DataBinder.Eval(Container, "DataItem.AdviceNote") %></td>
</tr>
<tr>
<td>Supplier ID:</td>
<td><%# DataBinder.Eval(Container, "DataItem.SupplierID") %></td>
</tr>
<tr>
<td>Cert/Cast No:</td>
<td><%# DataBinder.Eval(Container, "DataItem.CastNo") %></td>
</tr>
<tr>
<td>Date Rec'd:</td>
<td><%# DataBinder.Eval(Container, "DataItem.DateRecd") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</form>
Public Class viewta2
Inherits System.Web.UI.Page
Protected WithEvents tblRequest As HtmlTable
Protected WithEvents tblResults As HtmlTable
Protected WithEvents cmdSearch As System.Web.UI.WebControls.Button
Protected WithEvents rpResults As System.Web.UI.WebControls.Repeater
Protected WithEvents txtTANumber As TextBox
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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.Visible = True
tblRequest.Visible = False
oConn = New SqlConnection(Application("DB"))
oCmd = New SqlCommand("Exec TA_GetTADetails " & txtTANumber.Text, oConn)
oConn.Open()
With rpResults
.DataSource = oCmd.ExecuteReader()
.DataBind()
End With
oConn.Close()
Else
'Hide(results)
tblResults.Visible = False
tblRequest.Visible = True
End If
End Sub
End Class 1 7607
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*******@newsgroups.nospam> wrote in message
news:eT**************@TK2MSFTNGP09.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:TextBox ID="txtTANumber" MaxLength="10" Runat="server"
/></td> </tr> <tr> <td> </td> <td><asp:Button 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.TANumber") %></th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td>PO Number:</td> <td><%# DataBinder.Eval(Container, "DataItem.PONumber") %></td> </tr> <tr> <td>PO Line:</td> <td><%# DataBinder.Eval(Container, "DataItem.POLine") %></td> </tr> <tr> <td>Part No:</td> <td><%# DataBinder.Eval(Container, "DataItem.PartNumber") %></td> </tr> <tr> <td>Part XRef:</td> <td><%# DataBinder.Eval(Container, "DataItem.PartXref") %></td> </tr> <tr> <td>Description:</td> <td><%# DataBinder.Eval(Container, "DataItem.DescText") %></td> </tr> <tr> <td>Quantity Rec'd:</td> <td><%# DataBinder.Eval(Container, "DataItem.QuantityRecd") %></td> </tr> <tr> <td>Advice Note:</td> <td><%# DataBinder.Eval(Container, "DataItem.AdviceNote") %></td> </tr> <tr> <td>Supplier ID:</td> <td><%# DataBinder.Eval(Container, "DataItem.SupplierID") %></td> </tr> <tr> <td>Cert/Cast No:</td> <td><%# DataBinder.Eval(Container, "DataItem.CastNo") %></td> </tr> <tr> <td>Date Rec'd:</td> <td><%# DataBinder.Eval(Container, "DataItem.DateRecd") %></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> </form> Public Class viewta2 Inherits System.Web.UI.Page
Protected WithEvents tblRequest As HtmlTable Protected WithEvents tblResults As HtmlTable Protected WithEvents cmdSearch As System.Web.UI.WebControls.Button Protected WithEvents rpResults As System.Web.UI.WebControls.Repeater Protected WithEvents txtTANumber As TextBox
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 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.Visible = True tblRequest.Visible = False
oConn = New SqlConnection(Application("DB")) oCmd = New SqlCommand("Exec TA_GetTADetails " & txtTANumber.Text,
oConn) oConn.Open()
With rpResults .DataSource = oCmd.ExecuteReader() .DataBind()
End With
oConn.Close()
Else 'Hide(results) tblResults.Visible = False tblRequest.Visible = True End If
End Sub
End Class
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Donald Firesmith |
last post by:
I am having trouble having Google Adsense code stored in XSL converted
properly into HTML. The <> unfortunately become < and > and then
no longer work.
XSL code is:
<script...
|
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...
|
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...
|
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><%#...
|
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" ..%>
|
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...
|
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 <,...
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |