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

First, let me to thank Mr. Steve Stchur for the great XML control, and I will try in this article to express how to build a complete survey engine based on sstchur.web.survey.dll version 2.6.

You may expect that I will build this solution based on XML files, but I can’t resist my love to SQL Server, so in this article I will construct the survey engine to use SQL Server Database and XML files for just display.
At the beginning, we need to build our database which contains 3 tables as the following:

db.JPG


If you look at the database design you will discover that I’m storing the XML into database fields! And I recall it back to XML files if the selected survey is active.


Second step is to build VS.NET project and writing our code; obviously you will notice that my code here is not commented well, so please forgive me for that, but I promise I will do my best to get some time to comment my code.

xml.jpg
As Websurvey designed to read from XML files, I’ve created 4 XML files to handle this job, two files as temporary and the others to display questions and collect responses from people. 


As expected the most complicated part of this project is how to build and Edit a survey through parsing and modify and save XML, also to be presented in Back-end survey page.
I think you may feel with this complication if you look at this part of code:
 

 DataTable dt = db.GetSurveyXML(id); 
 string surveyXML = ""; 
 foreach(DataRow dr in dt.Rows) 
 {
            surveyXML += dr["SurveyXML"].ToString(); 
 } 
 DataTable Sur = db.GetSurveyByID(id); 
 lblSurveyName.Text = Sur.Rows[0]["SurveyName"].ToString(); 
 chkActive.Checked =Convert.ToBoolean(Sur.Rows[0]["Active"].ToString()); 
 DataTable result = GetQuestionTable(); 
 if(surveyXML.Trim()!="") 
 { 
     XmlDataDocument xmlDoc =new XmlDataDocument(); 
     xmlDoc.LoadXml(surveyXML); 
     foreach(XmlNode nd in xmlDoc.ChildNodes[1].ChildNodes) 
      { 
           DataRow gdr = result.NewRow(); 
           if(nd.Name=="Group")
            {
                  gdr["id"] = nd.Attributes["id"].Value; 
                  gdr["type"] = "New Page"; 
                  result.Rows.Add(gdr);
             }
             foreach(XmlNode ind in nd.ChildNodes) 
             {
                DataRow dr = result.NewRow(); 
                switch(ind.Name) 
                {
                      case "Question":
                           if(ind.Attributes["id"]!= null)
                            {
                                   dr["id"] = ind.Attributes["id"].Value;
                            }
                            switch(ind.Attributes["type"].Value) 
                            {
                                   case "shortans": 
                                       dr["type"] = "Text Box"; 
                                   break
                                   case "mcss": 
                                         dr["type"] = "Radio Buttons"; 
                                   break;
                                   case "mcms": 
                                         dr["type"] = "Check Boxes"; 
                                   break
                                   case "essay": 
                                          dr["type"] = "Text Area";
                                    break
                              } 
                              if(ind.Attributes["required"]!= null
                              { 
                                  dr["required"] = ind.Attributes["required"].Value; 
                              } 
                              if(ind.Attributes["layout"]!=null
                            { 
                                  dr["Layout"] = ind.Attributes["layout"].Value; 
                                                } 
                              if(ind.Attributes["cols"]!= null

                                                 ............................................................

          

Anyway, this part is just a sample, and I‘ve put all source code for download in the bottom.

You will find 4 aspx forms:

Default.aspx which will be presented to people

Result.aspx which you can see result of the survey, but I remove the survey result from front-end. I see it is better to be represented in back-end

SurveyList.aspx which list surveys in back-end

Survey.aspx which display and build and edit surveys.

The following figure showing survey list page:

 

list.jpg

 

And when you select a survey you will get the following page which will let you to build and edit surveys

 

sur.jpg

 

There is an important notice here: to save survey and get it active you should press "save survey data" then press "set active"

Even if you just modify active survey items, you should set it active again after saving to get information from database to files.

now you can build your survey with questions according to the following types:

 

types.jpg

 

I believe that this simple web survey can be enhanced form other interested guys if they like and republish it again, just contact me if you like.

Download source code here

 

Microsoft Visual Studio Code Name "Orcas" is the next generation development tool for Windows Vista, the 2007 Office System, and the Web.
 
for download and more details visit: Microsoft link
 

I've read a good written article talking about modifying the private My Site is where things begin to work differently, I think many people interested in SharePoint would like to know how would they modify My Site in SharePoint According to their needs. here is the link of the article

Customizing MOSS 2007 My Sites within the enterprise

Microsoft Security Bulletin MS07-018:

Vulnerabilities in Microsoft Content Management Server Could Allow Remote Code Execution (925939)

Tested Software and Security Update Download Locations:

Affected Software:

  Microsoft Content Management Server 2001 Service Pack 1 — Download the update (KB924430)

  Microsoft Content Management Server 2002 Service Pack 2 — Download the update (KB924429)

Read More:

http://www.microsoft.com/technet/security/bulletin/ms07-018.mspx

 

wcm.jpgHello everyone, since a few days, I became involved in building a large Internet portal for one of the most famous publication group in the Middle East, they have an intention for using Microsoft Office SharePoint 2007 to provide the portal framework for authoring and publishing daily news content.

During my research I have read many articles regarding Web Content Management (WCM) in SharePoint 2007, we may need to identify the main outlines or most significant issues which we should consider for building such publishing portal.

The first issue is to understand the new WCM in SharePoint Services 3.0 which include:

  • Understanding page model
  • Creating and customizing Master Pages
  • Creating page layouts (templates)
  • Customizing Site Navigation

One of the best resources which you can start with to understand WCM is MSDN library, you will find a complete reference at the following Posts:
Customizing and Branding Web Content Management-Enabled SharePoint Sites(Part 1 of 3)
Customizing and Branding Web Content Management-Enabled SharePoint Sites(Part 2 of 3)
Customizing and Branding Web Content Management-Enabled SharePoint Sites(Part 3 of 3)

The second issue is User Authentication, regarding this topic I've read many posts from many resources, the complete references which you can read beside MSDN are two posts; one of them from Andrew Connell, published in December 2006:
How To: Configure Publishing Site With Dual Authentication Providers And Anonymous Access

The other post from Dan Attis, Published Thursday, March 01, 2007
Office SharePoint Server 2007 Forms Based Authentication FBA Walkthrough (Part1)
Office SharePoint Server 2007 Forms Based Authentication FBA Walkthrough (Part 2)

If you go through previous two walkthroughs, you will cover most of what you need to build such publishing portal, except the two problems that Mr. Attis has mentioned in his post regarding My Site search in Forms Based Authentication (FBA), and applying best practice on My Site host which will require multiple sign in through navigating from site collection to My Site, which we all hope to get a solution for them soon.

You may find some articles elsewhere, but the most useful I got are these previous posts, also you may ask how could we import user profiles from the SQL Membership DB to SharePoint, and many questions. but I believe that at this point we can build a powerful portal if we ignore or getting over the previous issues.

A good list for helpful resources at the following link: http://www.andrewconnell.com/blog/articles/MossWcmResources.aspx

 

Microsoft Corp. introduced Microsoft® Interactive Media Manager, a next-generation digital content management solution that combines digital workflows and media application integration with a collaborative front-end environment. The solution, an extension of Microsoft Office SharePoint® Server 2007, is designed specifically for the media and entertainment industry, including film and post-production studios, broadcasters, game developers, publishers, and advertising and marketing agencies.

“As the digital era continues to alter the industry, we’re seeing the walls between previously disparate functions beginning to crumble as the strengths of IT are increasingly relevant and needed in the creative side of the house,” said Gabriele Di Piazza, managing director for Media & Entertainment in the Communications Sector at Microsoft. “Interactive Media Manager is a solution that spans those two formerly distinct worlds, automating the gaps that exist in the workflow process to create a fluid handoff between tasks and individuals.”

The full story at: http://www.microsoft.com/presspass/press/2007/apr07/04-15IMMPR.mspx