Software Development Technologies and Solutions
SharePoint | .NET | MCMS | MS SQL | Office

"Performance is usually top-of-mind for any web site deployment, including MOSS.  If you're writing code that deals with SharePoint items, and you're deploying that code to a site with even moderate traffic, you should consider using the PortalSiteMapProvider for increased performance.  In this post, Chris Richard takes us through the feature and describes how it can be leveraged.  Take it away Chris!"

A great post at "Microsoft Enterprise Content Management (ECM) Team Blog"

Read More

SendTecYes, in 6 weeks, those guys have done a great and appreciated work in such a short time using SharePoint 2007 for internet sites (WCM).

SendTec, Inc. is a multi-channel marketing company deploying traditional agency resources as well as innovative technology solutions for the benefit of ROI-minded advertisers. As part of an overall corporate rebranding effort, SendTec wanted to redesign the look and feel of their corporate website. The overall goals for the new site were:

  • To have a clean, modern look and feel.
  • To maintain existing search engine rankings.
  • To be easily managed by non-IT personnel.
  • To be completed quickly to meet the aggressive brand launch schedule.

Read More

ajax.jpg Hello again, since the release of MOSS 2007, I had the intention for developing a SharePoint web part which supports ASP.NET AJAX, and yesterday I’ve started the mission, I’ve read some useful posts from Microsoft and interested guys which helped me much to achieve the job.
Software needed:

  • SharePoint Portal Server 2007 (installed with site collection created on port: 80)
  • Visual Studio 2005
  • WSS 3.0 Extensions for Visual Studio 2005
  • ASP.NET 2.0 AJAX 1.0


First you need to configure your SharePoint Portal to support AJAX, to do this, it is better to open new AJAX web site in Visual Studio to pick a copy from configuration sections in web.config, or you can copy from here, so let‘s start:


1- Add the following part under: <configSections>

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>

 

2- Add the following part under: <pages >

<controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>


3- Add the following part under : <compilation><assemblies>

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />


4- Add the following part under: <httpHandlers>

<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

 

5-  Add the following part under: <httpModules>

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

6-  At the end of web.config add the following part under: <configuration>

<system.web.extensions>
    <scripting>
      <webServices>
      <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
      <!--
        <authenticationService enabled="true" requireSSL = "true|false"/>
      -->
      <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. -->
      <!--
      <profileService enabled="true"
                      readAccessProperties="propertyname1,propertyname2"
                      writeAccessProperties="propertyname1,propertyname2" />
      -->
      </webServices>
      <!--
      <scriptResourceHandler enableCompression="true" enableCaching="true" />
      -->
    </scripting>
  </system.web.extensions>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
           type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
  </system.webServer>

 

7- Before closing web.config we should add the AJAX controls dll to SharePoint Safe Controls, so copy the following part under: <SafeControls>

<SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />

 

8- It is time to include the AJAX script Manager to the master page, in my case I’ve included the script manager control in the default.master located in the following path:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL
So, according to your portal template; locate the right master page file or you can open the master page from the SharePoint Designer under _catalogs folder.
After you locate the master page file open the file then put the following line inside the top of <form> tag

<asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>

As shown below:


<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
 <WebPartPages:SPWebPartManager id="m" runat="Server" />
 <asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
  <TABLE class="ms-main" CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%" HEIGHT="100%">

 

9- Now it is time to write our code, open a new web part project in Visual studio 2005 then add reference of System.Web.Extensions  to the project and write the following  code to web part code file:

Note: There is a SharePoint Script included for changing the form action which may stop the form submission, so I included the FixFormAction method which will reset the form action again

 

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace AjaxWebPart
{
    [Guid("733ee261-6e34-49cf-ae29-e8aeb4df4563")]
    public class AjaxWebPart : System.Web.UI.WebControls.WebParts.WebPart
    {
        public AjaxWebPart()
        {
            this.ExportMode = WebPartExportMode.All;
        }
        // ASP.NET Controls declaration
        private Label label;
        private Label label2;
        private Label label3;

        private TextBox textBox1;
        private TextBox textBox2;

        // ASP.NET AJAX Controls declaration
        protected UpdatePanel udatePanel;
        protected UpdateProgress updateProgress;

        protected override void CreateChildControls()
        {

            base.CreateChildControls();

            // Fix Form Action
            this.FixFormAction();

            udatePanel = new UpdatePanel();
            updateProgress = new UpdateProgress();

            udatePanel.ID = "_UpdatePanel";
            updateProgress.ID = "_UpdateProgress";

            //Create Update Progress Template
            string templateHTML = "<div><img alt=\"Loading...\" src=\"/_layouts/images/loader.gif\"/>Loading...</div>";

            updateProgress.ProgressTemplate = new ProgressTemplate(templateHTML);

            updateProgress.AssociatedUpdatePanelID = udatePanel.ClientID;
           
            udatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;

            this.Controls.Add(udatePanel);
           
            this.label = new Label();
            this.label2 = new Label();
            this.label3 = new Label();

            this.label.Text = "Enter 1st Number: ";
            this.label2.Text = "Enter 2nd Number: ";
          
            this.textBox1 = new TextBox();
            this.textBox1.ID = "TextBox1";

            this.textBox2 = new TextBox();
            this.textBox2.ID = "TextBox2";

           //Adding Controls
            udatePanel.ContentTemplateContainer.Controls.Add(this.label);
            udatePanel.ContentTemplateContainer.Controls.Add(this.textBox1);
            udatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("<br />"));

            udatePanel.ContentTemplateContainer.Controls.Add(this.label2);
            udatePanel.ContentTemplateContainer.Controls.Add(this.textBox2);

            udatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("<br /><br />"));
           
            Button button = new Button();
            button.Text = "Calculate";

            button.Click += new EventHandler(HandleButtonClick);
            udatePanel.ContentTemplateContainer.Controls.Add(button);

            udatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("&nbsp;&nbsp;"));

            udatePanel.ContentTemplateContainer.Controls.Add(this.label3);

            udatePanel.ContentTemplateContainer.Controls.Add(updateProgress);
        }

        private void HandleButtonClick(object sender, EventArgs eventArgs)
        {
            //Just wait to see the progress loader working
            System.Threading.Thread.Sleep(1000);

            this.label3.Text = Convert.ToString(int.Parse(textBox1.Text) + int.Parse(textBox2.Text));

        }

        //Fixing Form Action
        private void FixFormAction ()
        {
            if (this.Page.Form != null)
            {
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
                if (formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
                {
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
                }
            }
            ScriptManager.RegisterStartupScript(this, typeof(AjaxWebPart), "UpdatePanelFixup", "_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;", true);
        }
    }

    //Class for Building progress tempales
    public class ProgressTemplate : ITemplate
    {
        private string template;

        public ProgressTemplate(string temp)
        {
            template = temp;
        }

        public void InstantiateIn(Control container)
        {
            LiteralControl ltr = new LiteralControl(this.template);
            container.Controls.Add(ltr);
        }
    }
}

 

Then build and deploy the web part, as you see it is a simple web part to calculate summation of two integers.
 

Download Source Code

If Microsoft and Yahoo merge Google may have to worry about its ms-yah.jpghold on the consumer search and online advertising markets.

Jon Brodkin, NetworkWorld

The potential of a Microsoft-Yahoo blockbuster deal probably doesn't have rivals at Google shaking in their boots just yet, but if a merger comes to fruition Google may have to worry about its hold on the consumer search and online advertising markets.

Google has performed well in creating and acquiring interesting technology with audience and advertiser reach, says Yankee Group analyst Jennifer Simpson, while noting Google's purchase of YouTube and Internet advertising company DoubleClick. Read More

 


 

Good day everyone, It is a simple C#.NET Ads Manager which you can manage more that one category , and each category may has more than one banner, you can control the percentage or weight for each banner, also there is a click-tracker for each banner, it has SQL Server database. here is a screen shot

AdManager.jpg

download the source here

Hi, in this project I tried to build a structured Image gallery based on file system using C#.NET 1.1, I've put some effects on thumbnails and folders, if  you like to add any further enhancements just download the source and enjoy it. I believe that this Image Galley needs a file manager/uploader, I may develop it in the neer future. you will find a folder named "GalleryPictures" inside "resources" folder, this folder which I store all gallery  pictures and folders. here is a screen shot:

ImageGallery.jpg


Download source code

 

Ryan Paul:

Microsoft has unveiled a new Dynamic Language Runtime (DLR) layer for the .NET development platform. Designed to simplify the process of bringing support for additional dynamic languages to .NET, the Dynamic Language Runtime is largely based on lessons learned from developing IronPython, an implementation of the Python programming language that runs on .NET's Common Language Runtime (CLR).

Microsoft developers have already been able to build implementations of Python, Ruby, Javascript, and Visual Basic that can run on the DLR, and the company hopes that releasing the DLR infrastructure under a highly-permissive BSD-style Shared Source license will entice independent developers to add support for other languages as well. Since the DLR acts as a layer on top of the CLR, dynamic languages that leverage the DLR will have full access to .NET programming libraries written in other languages like C#.

Full story: here

eWEEK: The Top Five Web Application Developments of the Year:

opera.jpg

Opera 9

Maintaining its tradition as the most innovative Web browser of recent years, Opera 9 has once again set the bar high when it comes to new capabilities and improving and extending the experience of using the Web and the Internet.

 

moss.jpgSharePoint Portal Server 2007

Office SharePoint Server 2007 will be a welcome upgrade from previous versions of the platform, including a cornucopia of new template options for quickly building a wide variety of Web sites, portals and community pages as well as much-improved workflow and routing features

 

wp.jpgWord Press 2.05

The added ability to create a new category directly from the post-writing interface should be standard in any blogging system. An improved roles system for users replaces previous versions' bizarro level system, and the post preview area now actually reflects what posts will look like in the real blog.

 

firefox.jpgFireFox 2.0

eWEEK Labs found Firefox 2.0 to have the greatest out-of-the-box usability of any Web browser that we have tested. From improvements in tabbed window management to built-in spell checking to integrated search aids, new features make it very easy for any user to take full advantage of modern Web browser capabilities.

 

IIS 7.0iis.jpg

The improvements in IIS 7 are all worthwhile, based on eWEEK Labs' tests, and should ease the task of managing and securing the Web server while making it possible to build rich and dynamic applications on top of it.

 

 

Visit eWEEK link: here