CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

Archive for the ‘.Net 3.0’ Category

Test in Multiple Browsers

Posted by Clayton James on May 29, 2009

This has always been a problem for developers with requirements to support multiple browsers. When writing code various browsers render the exact same peice of code differently. So the development process consists of programming workarounds so they render the same or very similar.

Now we have a free tool that we can use to test multiple browsers easily during our development process.

http://www.xenocode.com/browsers/

Advertisements

Posted in .NET 2.0, .Net 3.0 | 2 Comments »

Add .Net User Controls to SharePoint

Posted by Clayton James on May 25, 2009

I have been developing inside SharePoint for a while now and while things are getting easier with tools I think this process for developing User Controls inside SharePoint gives me a lot of control.

  1. I have a Graphical User Interface
  2. I have a separate project to build and test outside of SharePoint
  3. I can easily update and view my project html and binary code

Currently this process doesn’t create me any SharePoint Solution files to deploy across environments. I think to achieve this I will need to create a VS 2008 SharePoint Project…but so far these projects seem to add weight and time that I don’t want at the moment…while I am developing.

  1. Create a VS2008 web project
  2. In IIS create an IIS Application under your SharePoint web site that has a path to your VS2008 web project created above. This helps for updating content
  3. In your VS2008 project create some user controls and test that they function
  4. In VS2008 project properties under the Build Events¬†tab point the Post Build events text box and add a copy statement to copy your .dlls and .pdbs to¬†your SharePoint web sites bin directory. This will deploy a new .dll every time you build your VS2008¬†project. I had problems when I put the VS2008 project .dll into the¬†GAC…it only worked when I put it into the SharePoint’s web sites bin directory
  5. Update your master page with CSS references if your VS2008 project contains a style sheet.
  6. In SPD in your Page Layout add a Register directive to register your user control
    “<%@ Register Src=”~/UI/UserControls/JobGoals.ascx” TagPrefix=”uc1″ TagName=”JobGoals” %>”
    OR
    Update the SharePoint web site web.config file
    <pages>
      <controls>
    ¬†¬†¬†¬†¬†¬†¬† <add¬†src=”~/UI/UserControls/MyAttributes.ascx”¬†tagPrefix=”uc1″ tagName=”MyAttributes”/>
    ¬†¬†¬†¬†¬†¬†¬† <add src=”~/UI/UserControls/JobGoals.ascx” tagPrefix=”uc1″ tagName=”JobGoals” />
        </controls>
    </pages>
  7. Add the User Control to the Page Layout
    <uc1:JobGoals ID=”JobGoals1″ runat=”server” />
  8. Update the SharePoinnt web sites web.config file
    <SafeControl Src=”~/UI/*”¬† IncludeSubFolders=”True” Safe=”True” AllowRemoteDesigner=”True” />
  9. Restart IIS, navigate to a page that uses the page layout and you should see your User Control

Because we created a IIS Application under our SharePoint web site and mapped our VS2008 projects .dll output path to our SharePoints web site, updates are extremely simple.

  1. .ascx changes:                modify, save in VS2008 and refresh sharepoint browser
  2. .ascx.cs changes:          modify, save, build  in VS2008 and refresh sharepoint browser

Posted in .NET 2.0, .Net 3.0, WSS 3.0 | 4 Comments »

Microsoft Orcas Beta 1 image

Posted by Clayton James on May 9, 2007

For those that want to get their hands dirtly early, download Orcas pre-release image (around 6 gb)

http://www.microsoft.com/downloads/details.aspx?FamilyId=36B6609E-6F3D-40F4-8C7D-AD111679D8DC&displaylang=en

Posted in .Net 3.0 | Leave a Comment »