Zero2Cool
2013-03-13T15:22:44Z
I decided to use the Sample App in the yafnet_c506b81b07a3 build, but I can't compile because of this error.



'object' does not contain a definition for 'ToType' and no extension method 'ToType' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)	

c:\Users\Kevin\Desktop\yafnet_c506b81b07a3\yafsrc\YAF.Extras\YAF.SampleWebApplication\C#\YAF.SampleWebApplication\forum\controls\ForumModeratorList.ascx	13	122	YAF.SampleWebApplication




The code for the page with the error is this one...

<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" Inherits="YAF.Controls.ForumModeratorList" Codebehind="ForumModeratorList.ascx.cs" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="YAF.Types.Interfaces" %>
<%@ Import Namespace="YAF.Utils" %>

<asp:Repeater ID="ModeratorList" runat="server">
    <HeaderTemplate>
     <YAF:ThemeImage ID="ModImage" ThemeTag="MODS_SMALL" runat="server" />
     <%# this.GetText("DEFAULT", "MODERATORS")%>:
    </HeaderTemplate>
    <ItemTemplate>
        <asp:PlaceHolder ID="ModeratorUser" runat="server" Visible='<%# ((DataRow)Container.DataItem)["IsGroup"].ToType<int>() == 0 %>'>
            <YAF:UserLink ID="ModeratorUserLink" runat="server" UserID='<%# ((DataRow)Container.DataItem)["ModeratorID"].ToType<int>() %>'
                /></asp:PlaceHolder><asp:PlaceHolder
                ID="ModeratorGroup" runat="server" Visible='<%# ((DataRow)Container.DataItem)["IsGroup"].ToType<int>() != 0 %>'><strong><%# ((DataRow)Container.DataItem)["ModeratorName"].ToString() %></strong></asp:PlaceHolder></ItemTemplate>
    <SeparatorTemplate>, </SeparatorTemplate>
</asp:Repeater>
<asp:PlaceHolder ID="BlankDash" runat="server">- </asp:PlaceHolder>


Sponsor
Zero2Cool
2013-03-13T15:45:36Z
Scratch this ... the .ascx files were not updated. Once I brought the new ascx files over from the YetAnotherForum.NET directory, it compiled.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved