+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / Error Creating Control

Error Creating Control

14 posts, 0 answered
  1. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    29 Mar 2010
    Link to this post

    Hi Team,

    I used Sitefnity 3.7 community.I have asp.net 2005 and sql server 2005.
    I have error in module creation.
    My source code is
    001.<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CommandPanel.ascx.cs" Inherits="ContactsModule_Admin_CommandPanel" %>
    002.<%@ Register Assembly="RadMenu.Net2" Namespace="Telerik.WebControls" TagPrefix="radM" %>
    003.<%@ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="radT" %>
    004.<h2>
    005.    Manage departments</h2>
    006.<radT:RadTreeView ID="departmentsTreeview" runat="server" BeforeClientContextMenu="ShowRadMenu"
    007.    AllowNodeEditing="true" SingleExpandPath="true" DataFieldID="ID" DataFieldParentID="ParentID"
    008.    DataSourceID="sqlDsDepartments" DataTextField="DepartmentName" DataValueField="ID"
    009.    OnNodeEdit="DepartmentsTreeview_NodeEdit" OnDataBound="departmentsTreeview_DataBound" />
    010.<radM:RadMenu ID="departmentsContextMenu" runat="server" IsContext="true" ContextMenuElementID="none"
    011.    OnItemClick="DepartmentsContextMenu_ItemClick" OnClientItemClicking="ContextMenuItemClicking">
    012.    <Items>
    013.        <radM:RadMenuItem Text="Add new department" CommandName="add">
    014.        </radM:RadMenuItem>
    015.        <radM:RadMenuItem Text="Rename department" CommandName="rename">
    016.        </radM:RadMenuItem>
    017.        <radM:RadMenuItem Text="Delete department" CommandName="delete">
    018.        </radM:RadMenuItem>
    019.    </Items>
    020.</radM:RadMenu>
    021.<asp:HiddenField ID="contextMenuTreeNode" runat="server" />
    022.<asp:SqlDataSource ID="sqlDsDepartments" runat="server" ConnectionString="<%$ ConnectionStrings:Sitefinity %>"
    023.    DeleteCommand="DELETE FROM [sample_Departments] WHERE [ID] = @ID" InsertCommand="INSERT INTO [sample_Departments] ([ID], [DepartmentName], [ParentID]) VALUES (@ID, @DepartmentName, @ParentID)"
    024.    SelectCommand="SELECT * FROM [sample_Departments]" UpdateCommand="UPDATE [sample_Departments] SET [DepartmentName] = @DepartmentName, [ParentID] = @ParentID WHERE [ID] = @ID">
    025.    <DeleteParameters>
    026.        <asp:Parameter Name="ID" Type="Object" />
    027.    </DeleteParameters>
    028.    <UpdateParameters>
    029.        <asp:Parameter Name="DepartmentName" Type="String" />
    030.        <asp:Parameter Name="ParentID" Type="Object" />
    031.        <asp:Parameter Name="ID" Type="Object" />
    032.    </UpdateParameters>
    033.    <InsertParameters>
    034.        <asp:Parameter Name="ID" Type="Object" />
    035.        <asp:Parameter Name="DepartmentName" Type="String" />
    036.        <asp:Parameter Name="ParentID" Type="Object" ConvertEmptyStringToNull="true" />
    037.    </InsertParameters>
    038.</asp:SqlDataSource>
    039.<h2>
    040.    Filter by last name</h2>
    041.<ul class="alphabet">
    042.    <li>
    043.        <asp:LinkButton ID="lnkA" runat="server" Text="A" CommandArgument="A" OnCommand="letterLink_Command"></asp:LinkButton></li>
    044.    <li>
    045.        <asp:LinkButton ID="lnkB" runat="server" Text="B" CommandArgument="B" OnCommand="letterLink_Command"></asp:LinkButton></li>
    046.    <li>
    047.        <asp:LinkButton ID="lnkC" runat="server" Text="C" CommandArgument="C" OnCommand="letterLink_Command"></asp:LinkButton></li>
    048.    <li>
    049.        <asp:LinkButton ID="lnkD" runat="server" Text="D" CommandArgument="D" OnCommand="letterLink_Command"></asp:LinkButton></li>
    050.    <li>
    051.        <asp:LinkButton ID="lnkE" runat="server" Text="E" CommandArgument="E" OnCommand="letterLink_Command"></asp:LinkButton></li>
    052.    <li>
    053.        <asp:LinkButton ID="lnkF" runat="server" Text="F" CommandArgument="F" OnCommand="letterLink_Command"></asp:LinkButton></li>
    054.    <li>
    055.        <asp:LinkButton ID="lnkG" runat="server" Text="G" CommandArgument="G" OnCommand="letterLink_Command"></asp:LinkButton></li>
    056.    <li>
    057.        <asp:LinkButton ID="lnkH" runat="server" Text="H" CommandArgument="H" OnCommand="letterLink_Command"></asp:LinkButton></li>
    058.    <li>
    059.        <asp:LinkButton ID="lnkI" runat="server" Text="I" CommandArgument="I" OnCommand="letterLink_Command"></asp:LinkButton></li>
    060.    <li>
    061.        <asp:LinkButton ID="lnkJ" runat="server" Text="J" CommandArgument="J" OnCommand="letterLink_Command"></asp:LinkButton></li>
    062.    <li>
    063.        <asp:LinkButton ID="lnkK" runat="server" Text="K" CommandArgument="K" OnCommand="letterLink_Command"></asp:LinkButton></li>
    064.    <li>
    065.        <asp:LinkButton ID="lnkL" runat="server" Text="L" CommandArgument="L" OnCommand="letterLink_Command"></asp:LinkButton></li>
    066.    <li>
    067.        <asp:LinkButton ID="lnkM" runat="server" Text="M" CommandArgument="M" OnCommand="letterLink_Command"></asp:LinkButton></li>
    068.    <li>
    069.        <asp:LinkButton ID="lnkN" runat="server" Text="N" CommandArgument="N" OnCommand="letterLink_Command"></asp:LinkButton></li>
    070.    <li>
    071.        <asp:LinkButton ID="lnkO" runat="server" Text="O" CommandArgument="O" OnCommand="letterLink_Command"></asp:LinkButton></li>
    072.    <li>
    073.        <asp:LinkButton ID="lnkP" runat="server" Text="P" CommandArgument="P" OnCommand="letterLink_Command"></asp:LinkButton></li>
    074.    <li>
    075.        <asp:LinkButton ID="lnkQ" runat="server" Text="Q" CommandArgument="Q" OnCommand="letterLink_Command"></asp:LinkButton></li>
    076.    <li>
    077.        <asp:LinkButton ID="lnkR" runat="server" Text="R" CommandArgument="R" OnCommand="letterLink_Command"></asp:LinkButton></li>
    078.    <li>
    079.        <asp:LinkButton ID="lnkS" runat="server" Text="S" CommandArgument="S" OnCommand="letterLink_Command"></asp:LinkButton></li>
    080.    <li>
    081.        <asp:LinkButton ID="lnkT" runat="server" Text="T" CommandArgument="T" OnCommand="letterLink_Command"></asp:LinkButton></li>
    082.    <li>
    083.        <asp:LinkButton ID="lnkU" runat="server" Text="U" CommandArgument="U" OnCommand="letterLink_Command"></asp:LinkButton></li>
    084.    <li>
    085.        <asp:LinkButton ID="lnkV" runat="server" Text="V" CommandArgument="V" OnCommand="letterLink_Command"></asp:LinkButton></li>
    086.    <li>
    087.        <asp:LinkButton ID="lnkW" runat="server" Text="W" CommandArgument="W" OnCommand="letterLink_Command"></asp:LinkButton></li>
    088.    <li>
    089.        <asp:LinkButton ID="lnkX" runat="server" Text="X" CommandArgument="X" OnCommand="letterLink_Command"></asp:LinkButton></li>
    090.    <li>
    091.        <asp:LinkButton ID="lnkY" runat="server" Text="Y" CommandArgument="Y" OnCommand="letterLink_Command"></asp:LinkButton></li>
    092.    <li>
    093.        <asp:LinkButton ID="lnkZ" runat="server" Text="Z" CommandArgument="Z" OnCommand="letterLink_Command"></asp:LinkButton></li>
    094.    <li>
    095.        <asp:LinkButton ID="lnkAll" runat="server" Text="All" CommandArgument="%" OnCommand="letterLink_Command"></asp:LinkButton></li>
    096.</ul>
    097.<div style="clear: left;">
    098.    <!-- -->
    099.</div>
    100.<div style="background-color: #71888D; color: #FFFFFF; padding: 5px;">
    101.    <h3>
    102.        How to add, remove or edit department?</h3>
    103.    Right-click on the department to see the availabe commands.
    104.</div>

    I have attached my design view PrintScreen.
    Thanks in advance.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Mar 2010
    Link to this post
    Hi Rosy,

    The reference that I see in your control header

    <%@ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="radT" %>

    <%@ Register Assembly="RadMenu.Net2" Namespace="Telerik.WebControls" TagPrefix="radM" %>

    are used in Sitefinity versions before 3.2. From version 3.2 all controls are embedded into Telerik.Web.UI.dll. Most probably you are using some incorrect reference, or you need to rebuild your project to find the correct tags.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    30 Mar 2010
    Link to this post
    Hi Team,

    I have created custom module.How to display that like Generic Content,News,Blogs in modules.
    I have attached the PrintScreen.

    Thanks in advance.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Mar 2010
    Link to this post
    Hello Rosy,

    I suggest that you should take a look at this posts which explains how to work with modules very descriptively



    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    31 Mar 2010
    Link to this post
    Hi Team,

    Thanks for your quick response.I have used the http://www.sitefinity.com/blogs/ivan/posts/09-02-26/sample_pluggable_module_contacts_pluggable_module.aspx link.

    But I have error in sitefinity website.

    The error PrintScreen is attached.

    Thanks in advance. 


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Mar 2010
    Link to this post
    Hi Rosy,

    You have not referenced the module the custom module to your Sitefinity website. Make sure that you have correct references and Sample.Contacts dll is generated in your bin folder.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    31 Mar 2010
    Link to this post
    Hi team,

    Thanks for your quick response.

    My bin folder have sample.contacts dll

    My bin folder is attached.

    Thanks in advance.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Mar 2010
    Link to this post
    Hello Rosy,

    You are missing essential references for the Contacts module. Please take a look at MSDN to gather more information about how to add a references.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    01 Apr 2010
    Link to this post
    Hi team,

    Thanks for your quick response.

    I have used Sample intra site module:Contacts intra site module.

    Quick installation guide
    • Download the project from here
    • Create a new Sitefinity website or open an existing one (make sure that the name of connection string for your Sitefinity database is “Sitefinity”. “Sitefinity” is a default connection string name, so unless you have not changed it, you don’t need to do anything)
    • Execute the db_create.sql file against your database to create the two needed tables for the contacts module
    • Copy and paste App_Code, Modules and Sitefinity folders from the project you have downloaded to the root folder of your website
    • Register the public controls for contacts module by adding following lines in the web.config as children of the toolboxControls element (after the <clear /> declaration!)
      <add name="Contacts List" section="Contacts" url="~/Modules/Contacts/Views/Frontend/ContactsListView.ascx" /> 
      <add name="Single Contact" section="Contacts" url="~/Modules/Contacts/Views/Frontend/SingleContactView.ascx" /> 
       
    • Run Sitefinity and try out the contacts module.

    I have followed above the steps.I have error while run the sitefinity.

    I attached the error file.

    Thanks in advance.




  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Apr 2010
    Link to this post
    Hello Rosy,

    I prepared a sample project with ContactsModule included. There is also database backup that you have to restore. You can use "admin" as username and password to access the backend.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  11. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    05 Apr 2010
    Link to this post
    Hi Team,

    Thank you very much.But I can't restore the database.

    I have attached the error PrintScreen.

    Thanks in advance.


  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Apr 2010
    Link to this post
    Hello Rosy,

    The problem is not related to the backup.

    Click on "Options"  from where you have to select "Override existing database with replace" and there is a Grid from where you could change "Restore As".

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  13. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    05 Apr 2010
    Link to this post
    Hi Team,

    Thanks for your response.

    Sorry.I can't restore the database.

    I attached the error file.

    Thanks
      Rosey.



  14. Rosy
    Rosy avatar
    23 posts
    Registered:
    02 Mar 2010
    05 Apr 2010
    Link to this post
    Hi team,

    I have create a database.Then I take backup to the database before delete that database.
    Then I restore the database.The database is restored.But your database is not restored.Please tell me why.

    I use the Operating System is Windows Xp,Microsoft Visual Studio 2005,Microsoft SQL Server 2005 (Windows Authentication)

    I attached the restore error file.Please see that.

    Please tell me How to restore the database.

    Thanks
    Rosey.






Register for webinar
14 posts, 0 answered