"Specified cast is not valid." error

Discussion in 'ASP.NET / ASP.NET Core' started by 2Fast2BCn, Sep 20, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. 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
     
  2. 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(HtmlTextWriter writer)
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    System.Web.UI.Control.RenderChildren(HtmlTextWriter 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
     
  3.  
  4. I'm using several includes.
    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

    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> <A href="index.aspx">Introductie</A>
    ?</B> <A href="contact.aspx">Contact</A> </FONT></TD></TR></TBODY>
    </TABLE>
    </TD>
    </TR>
    </TBODY>
    </TABLE>
    </TD>
    </TR>
    </TBODY>
    </TABLE>
    </blockquote id="quote"></font id="quote">

    www.allnice.be
     
  5. 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
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page