No default member found

Discussion in 'ASP .Net' started by tshad, Feb 8, 2006.

  1. tshad

    tshad Guest

    I have a collection class(exChain), for my Exception log which is getting
    the following error:
    ***************************************************************************
    No default member found for type 'ExceptionLog'.
    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.MissingMemberException: No default member found
    for type 'ExceptionLog'.

    Source Error:


    Line 172: <asp:TemplateColumn HeaderText="">
    Line 173: <ItemTemplate>
    Line 174: <asp:LinkButton ID="FullName" Text='<%#
    Container.DataItem("ExceptionID")%>' OnClick="GetApplicantDetails_Click"
    runat="server"/>
    Line 175: </ItemTemplate>
    Line 176: </asp:TemplateColumn>


    Source File:
    C:\Inetpub\wwwroot\staffingworkshop\ADMINISTRATION\showExceptions.aspx
    Line: 174

    Stack Trace:


    [MissingMemberException: No default member found for type 'ExceptionLog'.]
    Microsoft.VisualBasic.CompilerServices.LateBinding.LateIndexGet(Object o,
    Object[] args, String[] paramnames) +1370
    ASP.showExceptions_aspx.__DataBind__control7(Object sender, EventArgs e)
    in
    C:\Inetpub\wwwroot\staffingworkshop\ADMINISTRATION\showExceptions.aspx:174
    System
    ****************************************************************************************************I don't know what could cause this:I have the statement: gridExceptionChain.DataSource = ExChain gridExceptionChain.DataBind()and my DataGrid is: <asp:DataGrid ID="gridExceptionChain" runat="server"AutoGenerateColumns="False" CellPadding=3> <HeaderStyle HorizontalAlign="Left" BackColor="Gainsboro" /> <Columns> <asp:TemplateColumn HeaderText=""> <ItemTemplate> <asp:LinkButton ID="FullName" Text='<%#Container.DataItem("ExceptionID")%>' OnClick="GetApplicantDetails_Click"runat="server"/> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:DataGrid>Is it something having to do with a collection?Thanks,Tom
     
    tshad, Feb 8, 2006
    #1
    1. Advertising

  2. tshad

    tshad Guest

    This works fine if I change the TemplateColumn to a BoundColumn. The
    problem is I need the templatecolumn so I can set up a LinkButton.

    I set up Datagrids all the time this way, why wouldn't it work here? Is it
    because I am using a collection as opposed to a Dataset or Datareader?

    Thanks,

    Tom

    "tshad" <> wrote in message
    news:...
    >I have a collection class(exChain), for my Exception log which is getting
    >the following error:
    > ***************************************************************************
    > No default member found for type 'ExceptionLog'.
    > 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.MissingMemberException: No default member found
    > for type 'ExceptionLog'.
    >
    > Source Error:
    >
    >
    > Line 172: <asp:TemplateColumn HeaderText="">
    > Line 173: <ItemTemplate>
    > Line 174: <asp:LinkButton ID="FullName" Text='<%#
    > Container.DataItem("ExceptionID")%>' OnClick="GetApplicantDetails_Click"
    > runat="server"/>
    > Line 175: </ItemTemplate>
    > Line 176: </asp:TemplateColumn>
    >
    >
    > Source File:
    > C:\Inetpub\wwwroot\staffingworkshop\ADMINISTRATION\showExceptions.aspx
    > Line: 174
    >
    > Stack Trace:
    >
    >
    > [MissingMemberException: No default member found for type 'ExceptionLog'.]
    > Microsoft.VisualBasic.CompilerServices.LateBinding.LateIndexGet(Object
    > o, Object[] args, String[] paramnames) +1370
    > ASP.showExceptions_aspx.__DataBind__control7(Object sender, EventArgs e)
    > in
    > C:\Inetpub\wwwroot\staffingworkshop\ADMINISTRATION\showExceptions.aspx:174
    > System
    > ****************************************************************************************************I
    > don't know what could cause this:I have the statement:
    > gridExceptionChain.DataSource = ExChain
    > gridExceptionChain.DataBind()and my DataGrid is: <asp:DataGrid
    > ID="gridExceptionChain" runat="server"AutoGenerateColumns="False"
    > CellPadding=3> <HeaderStyle HorizontalAlign="Left"
    > BackColor="Gainsboro" /> <Columns>
    > <asp:TemplateColumn HeaderText=""> <ItemTemplate>
    > <asp:LinkButton ID="FullName"
    > Text='<%#Container.DataItem("ExceptionID")%>'
    > OnClick="GetApplicantDetails_Click"runat="server"/>
    > </ItemTemplate> </asp:TemplateColumn> </Columns>
    > </asp:DataGrid>Is it something having to do with a collection?Thanks,Tom
    >
     
    tshad, Feb 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Eshtry
    Replies:
    2
    Views:
    4,342
    Teemu Keiski
    Feb 14, 2004
  2. mazda_88
    Replies:
    0
    Views:
    1,439
    mazda_88
    Jun 7, 2004
  3. =?Utf-8?B?VGltOjouLg==?=

    Error: No default member found???

    =?Utf-8?B?VGltOjouLg==?=, Jul 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    645
    Teemu Keiski
    Jul 8, 2004
  4. Andy Eshtry

    Error: No default member found for type MyClass

    Andy Eshtry, Feb 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    204
    Andy Eshtry
    Feb 13, 2004
  5. Rob
    Replies:
    1
    Views:
    220
Loading...

Share This Page