More in this section

Forums / Developing with Sitefinity / Creating modules in vb.net?

Creating modules in vb.net?

6 posts, 0 answered
  1. Nice2
    Nice2 avatar
    3 posts
    Registered:
    02 Oct 2007
    30 Oct 2007
    Link to this post
    Hello,

    Recently we tried your trial of Sitefinity. We like the CMS but are still exploring the development side.

    After reading different manuals and posts about creating your own modules, we were wondering if this is also possible with asp/vb.net using webcontrols instead of c#

    The reason we ask is because when looking in the sitefinity admin maps, I see for example that the polls module uses .ascx files.

    In the web.config I find template values for each module

    For example:

    editTemplate="~/Sitefinity/Admin/ControlTemplates/Polls/PollsEdit.ascx"   
    insertTemplate="~/Sitefinity/Admin/ControlTemplates/Polls/PollsInsert.ascx"   
    listTemplate="~/Sitefinity/Admin/ControlTemplates/Polls/PollsList.ascx"  

    We were wondering what the posibilities are for using webcontrols (ascx) for sitefinity, since the example used (contacts) only uses c#.

    Thank you already for the help.
  2. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    30 Oct 2007
    Link to this post

    Hello Nice2,

    Thanks for trying out our product. We hope you enjoy working with it.

    Sitefinity supports two types of modules - intra-site and pluggable. All modules that come installed with Sitefinity are pluggable modules, except for the sample Jobs module coming with a sample JobsIntraSite. Pluggable modules are compiled assemblies which can be deployed to multiple Sitefinity projects. Intra-site modules, on the other hand, are specific to the project they reside in. They cannot be shared between projects and are not compiled. Rather, they are source files in the App_Code folder of your project. Refer to our Developer Manual for more information on types of modules and their creation.

    Depending on your needs, you can create either an intra-site or a pluggable module. In both cases, you can use VB.NET instead of C#. With pluggable modules, your assembly is compiled so it doesn't matter how you wrote it, it only needs to conform to all requirements for Sitefinity modules. However, with pluggable modules you have to use custom controls (as opposed to user controls or .ascx files).

    If you want to use user controls, you can go for an intra-site module. Look at the sample Jobs module coming with Sitefinity for details. Although the Jobs module is written in C#, you can do it in VB with no problems.

    I want to clarify that the ASCX files you have cited are NOT user controls, they are just templates used to specify the markup of custom controls used in our modules. This is done with the purpose of separating the presentation from the implementation. They are loaded dynamically from code and can be changed if you want a different layout of your module controls. However, they are not controls by themselves.

    In short, you CAN use VB, just in the same way as C#. If you want to use User Controls, create an intra-site module, otherwise, a pluggable one. Do not hesitate to ask if you have any other questions about Sitefinity, we would be glad to help. Also, check out our online forums, User manual and Developer manual.

    Greetings,

    Slavo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Nice2
    Nice2 avatar
    3 posts
    Registered:
    02 Oct 2007
    30 Oct 2007
    Link to this post
    Thanks for the help :)

    I will be sure to reply with the results!
  4. Brook
    Brook avatar
    39 posts
    Registered:
    21 Mar 2007
    30 Oct 2007
    Link to this post
    Are there ay good VB examples available for perhaps an intra-site and a pluggable module?  This would expedite the learning process rather than having to tanslate the C# examples.

    Thank you in advance.
  5. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    30 Oct 2007
    Link to this post
    Hi Brook,

    There aren't any examples provided in Visual Basic. However, Telerik provides a tool - Code Converter - which converts a pasted code from C# to VB and vice versa. You can find it at this link. There should be no problems in just translating the examples provided for Sitefinity from C# to VB.

    Please write if there are any problems.

    All the best,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Brook
    Brook avatar
    39 posts
    Registered:
    21 Mar 2007
    30 Oct 2007
    Link to this post
    Thank you.  Will give it a whirl!
Register for webinar
6 posts, 0 answered