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

Forums / Developing with Sitefinity / Looking for Sample code and tutorials

Looking for Sample code and tutorials

3 posts, 0 answered
  1. Priti
    Priti avatar
    17 posts
    Registered:
    20 Nov 2008
    01 Dec 2008
    Link to this post
    Hello,

    I am new to Sitefinity and trying to learn it so that I can create a new website using it. I have seen your demo website and it's code. In this site many of the things are actually done at a page level using Sitefinity administrator UI. I could not find much of the ASP.NET code in the code files.

    I would like to see the samples where Sitefinity APIs are used to
    # create/modify pages,
    # adding new controls setting properties,
    # handling control events
    # Accessing content repository through code
    # showing content dynamically on page, etc.

    I have seen the code snippets for above things in Developers manual so I understand it's possible with sitefinity. But since I am very new to sitefinity I get a very basic questions like where to actually put this code because actual page created in Sitemap doesn't have physical existence as a .aspx file.
    So is it to be added to Template or do I need to create control / module every time I need to add a smallest functionality to my site?

    Please redirect me to any step by step tutorials that will help me in understanding the Sitefinity API usage. Or a sample code where similar functionality is achieved using APIs.

    I am really stuck up with API thing. I am able to create many things at design time but I would like to do same using the code at Run time.
    Please help.

    Thanks,

    Priti

  2. John
    John avatar
    32 posts
    Registered:
    08 Oct 2008
    01 Dec 2008
    Link to this post
    Hi Priti,

    The API code must go into an event. It could go into page load, button click, a checkbox being checked.

    You could create a user control with a button that creates a page (using the Sitefinity API), upload the user control to Sitefinity, and place it on a page. Take a look at the User Manual and the Uploading Controls section for more info. You could also make a master page with a button, for example, that executes making a page. Take a look at this article on working with master pages for more info. Furthermore, you could just create a .aspx page in Visual Studio and link it to Sitefinity. Look at Adding External Pages in that User Manual I mentioned before for more info.

    -John
  3. Priti
    Priti avatar
    17 posts
    Registered:
    20 Nov 2008
    02 Dec 2008
    Link to this post
    Thanks for the information John.

    Priti.
Register for webinar
3 posts, 0 answered