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
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