View Full Version : "Specified cast is not valid." error
2Fast2BCn
09-20-2004, 01:13 AM
While searching for a explenation
I discovered that there are different other way's then there includes...
I created a custom control that contains a PlaceHolder.
Then in the Render function I grabbed the content of a .txt/.html file and added that as a LiteralControl to the placeholder
User Webcotrol is also a solution
anyway found the problem myself
*edit: thanks steurm though
www.allnice.be
2Fast2BCn
09-20-2004, 04:36 AM
[b]quote:
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
[No relevant source lines]
Source File: c:\inetpub\wwwroot\ambo\index.aspx Line: 86
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
ASP.index_aspx.__Render__control2(HtmlTextWriter __output, Control parameterContainer) in c:\inetpub\wwwroot\ambo\index.aspx:86
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()
</blockquote id="quote"></font id="quote">
Don't know where to start lookin'
:s
www.allnice.be
steurm
09-20-2004, 07:59 AM
[quote]SourceFile:c:\inetpub\wwwroot\ambo\index.aspxLine: 86</CODE>
Maybe at line 86 ?
Can you show us the code at that line ?
--
Steurm
www.steurm.net/steurm
2Fast2BCn
09-20-2004, 09:13 AM
I'm using several includes.
[b]quote:
<!-- #include file=includes/head.txt -->
</blockquote id="quote"></font id="quote">
It's kinda hard to discover that line.
I tried to paste these includes in orrigenal "index.aspx"
and then the line should be in somewhere in this block.
It's all HTML :s
[b]quote:
<TABLE cellSpacing=0 cellPadding=1 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#006699>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff>
<TABLE cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD background="pics/cellpic1.gif" bgColor=#eaedf4 height=27>
<TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD><FONT class=block-title><STRONG>Welkom</STRONG></FONT></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#eaedf4>
<TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD><FONT class=content>
<center><img src="pics/pig-s.gif"></img></center>
[b]?</B> <A href="index.aspx">Introductie</A> [b]
[b]?</B> <A href="contact.aspx">Contact</A> [b][b]</FONT></TD></TR></TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</blockquote id="quote"></font id="quote">
www.allnice.be
2Fast2BCn
09-20-2004, 09:37 AM
I inserted some lines at te beginning of my "index.aspx"-file
but te line number of the error stay's at line 86
that's not possible :s
or is it?
www.allnice.be
vBulletin® ©Jelsoft Enterprises Ltd.