What are you blogging today?

As you may have noticed I recently went through a steep learning curve on SharePoint. The best part was it turned out to be a liberation on my blogging mindset.

I started blogging back in 2003 after being inspired by Scoble and Winer. The type of blogging I was doing back then is now coined a link blog with a few of my own reflections thrown in.

If you’ve been subscribing to blogs you tend to come across posts that tell you how to write good posts, what you should have in your post and what not to post. Subconsciously these posts made me raise the bar higher and higher on the type of stuff I should be posting about.

Not anymore, bah humbug to all of those posts that tell you how to blog. I’ve since realised that every small thing I learn each day is going to help some poor soul in the future. I was that poor soul when I was (am) learning SharePoint and boy did those short tips from others really help out.

So remember no post is too small or irrelevant in the eyes of the beholder who searches for it in Google.

So show some love to your abandoned blog today.

What are you blogging today?
  • Hi,
    I’m Susantha, currently working in a Global IT solution company in Sri Lanka as a software engineer. But share point server is bit new for me. We are developing a web based project. We doing whatever we need in ASP.net page, and we deploy it to share point server. But we are doing that , by creating individual project per ASP.net page.
    If we need to deploy a page, we have to create a new project in .net and put that page into that project. Now I need to have two pages in same project. My problem is , if I create two pages which depend on each others, and finally deployed, will it work properly in share point server?

    Thanks &
    Regards,
    Susantha Andradi.
    Associate Engineer – Technology,

  • Susantha, there are much better ways to do it than how your doing it right now.
    Take a look at wspbuilder and stsdev

    http://www.codeplex.com/wspbuilder
    http://www.codeplex.com/stsdev

  • Dear Merill, Thanks for your quick response. It seems wspbuilder is very useful and very eazy to handle. I went through, what you have referenced. I need to look more how to add my aspx pages and code behind pages into FEATURE folder in wspbuilder project. By right clicking on the FEATURE folder, it doesn’t allow to add aspx pages.
    Anyway thank you very much for the references, i’ll look more and try to do my best.
    Thanks &
    Regards,
    -Susantha Andradi.

  • What I usually do is develop the .aspx pages on a standard web site project and then copy the .aspx page to the Layouts folder and .cs file to code folder on the WSP Builder project before deploying.

  • Dear Merill, thanks a lot for your hints. I’ll search more and let you know what could I do… If you can, please refer some references to learn this stuff more..

    Thanks in advance,
    Regards,
    -Susantha Andradi.

  • Dear Merill,
    As i promised you, I deployed 2 pages in one project successfully by using WSPBuilder. It is marvelous tool and very easy. But now problem is its deployed and displaying everything, but not working codebehind pages. By clicking buttons and inserting text in to boxes is not make anysenses for code behind. Am i missed something?

    This is my hierarchy ..

    Solution
    ……. |– Project 1
    ………..|12
    ……………..|– TEMPLATE
    …………………|– FEATURES
    …………………………|– Module1
    ……………………………………|-elements.xml file
    ……………………………………|-feature.xml file
    …………………|– LAYOUTS
    ………………………..|MYLAYOUTS
    ……………………………………|- Module1.aspx file
    ……………………………………|-Module1.aspx.cs file
    ……………………………………|- Module2.aspx file
    ……………………………………|-Module2.aspx.cs file
    ………..|GAC
    …………….| project1.dll

    By debugging my standard project, i got .dll files and put those in to GAC folder. And .aspx and code behind pages to LAYOUTS/MYLAOUTS folder.

    in WSPBuilder.exe.config file i added this tag,
    <add key="Excludefiletypes" value="scc" />
    to allow code behind .aspx.cs pages in LAYOUT Folder. ….

    also in .aspx page , I put following line too..
    <%@ Page Language="C#" MasterPageFile="~/_layouts/default.master" CodeBehind="Test.aspx.cs" %>

    Then I deployed..

    Today, it was deployed successfully and two icons appeared in right menu in share point. Also pages working separately.

    I coded to the page as " i can insert some text in 1st textbox and then once i click the button the string i inserted should appear in 2nd textbox…

    But in deployed page, once i insert some text in 1st text box and click the button, doesn’t appear anything in 2nd textBox. That means page doesn’t recognized the code behind page(.aspx.cs) properly? What i have missed?

    Can you please give some hints to over come this matter.
    Thanks in advance.
    Regards,
    -Susantha

  • You should move the .cs files from the layouts folder into the code folder and make sure that their action is set to compile so they will be included in the assembly. You’ll also need to change the header of the .aspx page to inherit from the assembly.

  • Thanks for the reply.

    I added following to the .aspx page header.

    <%@ Page Language="C#" MasterPageFile="~/_layouts/default.master" Inherits="Test.Test" Src="~/12/TEMPLATE/Code/Test.aspx.cs" EnableViewState="false" EnableViewStateMac="false" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>

    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    After I deployed the page, when i try to open the page, its appear –
    12/TEMPLATE/Code/Test.aspx.cs is not allow for this page.

    What is this error, still its seems to be not recognizing the aspx.cs page.