Page shows blanc when using template cc and expressions (<%# %>)

  • Thread starter Thread starter Johan Machielse
  • Start date Start date
J

Johan Machielse

Hi,

I have created a template custom control to show messages in a guestbook. On
my developer machine everything works as expected but after deploying to
production I get a blanc page with really nothing! I did some testing, here
are the results:

The following piece of code works perfectly (shows header and footer of
guestbook):

<cc1:GuestbookControl ID="guestbookControl" Name="XXX" runat="server">
<HeaderTemplate>
</HeaderTemplate>

<FooterTemplate>
<table style="width: 500px;" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td style="width: 250px; text-align:
left;">
<asp:Button ID="Button3"
runat="server" Text="Schrijf een bericht" OnClick="ButtonAddMessage_Click" />
</td>
<td style="width: 250px; text-align:
right;">
<asp:Button ID="Button1"
runat="server" Text="Vorige" OnClick="ButtonPrevious_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />

<asp:Button ID="Button2"
runat="server" Text="Volgende" OnClick="ButtonNext_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />
</td>
</tr>
</table>
</FooterTemplate>
</cc1:GuestbookControl>

But now, when I add two expressions (<%# %>), the page will be shown blanc,
which I really don't get because it does works on my dev machine.

<cc1:GuestbookControl ID="guestbookControl" Name="XXX" runat="server">
<HeaderTemplate>
</HeaderTemplate>


<FooterTemplate>
<table style="width: 500px;" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td style="width: 250px; text-align:
left;">
<asp:Button ID="Button3"
runat="server" Text="Schrijf een bericht" OnClick="ButtonAddMessage_Click" />
</td>
<td style="width: 250px; text-align:
right;">
<asp:Button ID="Button1"
runat="server" Text="Vorige" OnClick="ButtonPrevious_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />
<%# Container.CurrentPage + 1%> /
<%# Container.PageCount %>
<asp:Button ID="Button2"
runat="server" Text="Volgende" OnClick="ButtonNext_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />
</td>
</tr>
</table>
</FooterTemplate>
</cc1:GuestbookControl>

It also seems to go wrong when I add a nest control (without using
expressions), this also works perfectly on my dev machine:

<cc1:GuestbookControl ID="guestbookControl" Name="XXX" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<Messages>
<cc1:GuestbookMessageControl
ID="guestbookMessageControl" runat="server" Visible="False">
<MessageTemplate>
<table style="width: 500px;" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td style="width: 250px; height:
24px; padding-left: 10px; border-top: solid 1px White;
border-left: solid 1px
White; border-bottom: solid 1px White; text-align: left;">
</td>
<td style="width: 250px; height:
24px; padding-right: 10px; text-align: right; border-top: solid 1px White;
border-right: solid 1px
White; border-bottom: solid 1px White;">
</td>
</tr>
<tr>
<td colspan="2" style="width:
500px; text-align: left; vertical-align: top; padding: 10px 10px 10px 10px;
border-left: solid 1px
White; border-right: solid 1px White; border-bottom: solid 1px White;">
</td>
</tr>
</table>
<br />
</MessageTemplate>
</cc1:GuestbookMessageControl>
</Messages>
<FooterTemplate>
<table style="width: 500px;" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td style="width: 250px; text-align:
left;">
<asp:Button ID="Button3"
runat="server" Text="Schrijf een bericht" OnClick="ButtonAddMessage_Click" />
</td>
<td style="width: 250px; text-align:
right;">
<asp:Button ID="Button1"
runat="server" Text="Vorige" OnClick="ButtonPrevious_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />
<asp:Button ID="Button2"
runat="server" Text="Volgende" OnClick="ButtonNext_Click"

OnClientClick="_guestbook.Update();" Style="width: 75px;" />
</td>
</tr>
</table>
</FooterTemplate>
</cc1:GuestbookControl>

Source code of the blanc page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252"
http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>


It seems that the use of templates is supported on the server, but when
using expressions or nested templates it goes wrong: empty/blanc page is
shown. Does anyone have an idea what could be the cause of the problem and
how it can be solved?

Regards,

Johan Machielse
 
mister johans you are haveing much confusions because of extra
delimiter that is making other machine not happiness and showing empty
pages. you fix delimiter and you will have much successed. happiness
in helpings and demystifying.
 
Hi Shusta,

Thank for you answer, but I really don't get what delimiter you are talking
about. Could you point me which delimiter I have to fix and how I should do
this (example)?

Thank you in advance.

Johan
 
I solved the problem.

The guestbook was using the MySql.Data dll and this dll was not in the bin
directory. I copied the dll and everything works as expected.
 
Back
Top