YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
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
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Scratch this ... the .ascx files were not updated. Once I brought the new ascx files over from the YetAnotherForum.NET directory, it compiled.