Blog Home  Home Feed your aggregator (RSS 2.0)  
My DasBlog! - Wednesday, July 13, 2005
newtelligence powered
 
Friday, July 01, 2005 12:55:41 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2]   ASP.NET | C#  | 
I came accros a post, forget from who, referring to a article written by Heather Solomon. It describes a questionaire for SharePoint to gather information for determining which product implementation suit their needs. It helps you to decide between a Portal, WSS or both.

I think this questionaire is very helpfull for this kind of descisions and Heather did a great job posting it for all of us! Thanks Heather.

http://heathersolomon.com/blog/articles/446.aspx
Friday, July 01, 2005 9:53:31 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Wednesday, July 13, 2005

Microsoft has a nice collection of controls bundled into a package called "IE Web Controls". Except for the fact that they are fully unsupported some controls are very handy.

I have used the TreeView in a custom WebPart and had some difficulty setting the styles. It seems you have to set the styles DefaultStyle, HoverStyle and SelectedStyle. The DefaultStyle is used when no action takes place, the HoverStyle is set when you hover with your mouse over an item and the SelectedStyle is the style of a selected item. Here are two examples of setting the style in a TreeView.

<mytree:treeview runat="server" 
   
ID="tvwResources" 
   defaultStyle="font-family:Verdana,Arial,Sans-serif;color:#000000;font-size:11px;" 
   hoverStyle="font-family:Verdana,Arial,Sans-serif;color:#000000;font-size:11px;" 
   selectedStyle="font-family:Verdana,Arial,Sans-serif;color:#000000;font-size:11px;>
</mytree:treeview>

Or programmatically

mytree.DefaultStyle["font-family"] = "Verdana,Arial,Sans-serif";
mytree.DefaultStyle["color"] = "#000000";
mytree.DefaultStyle["font-size"] = "11px";

mytree.HoverStyle["font-family"] = "Verdana,Arial,Sans-serif";
mytree.HoverStyle["color"] = "#000000";
mytree.HoverStyle["font-size"] = "11px";

mytree.SelectedStyle["font-family"] = "Verdana,Arial,Sans-serif";
mytree.SelectedStyle["color"] = "#000000";
mytree.SelectedStyle["font-size"] = "11px";

Wednesday, July 13, 2005 7:39:05 AM (GMT Daylight Time, UTC+01:00)  #    Comments [9]   C# | Microsoft  | 

Paul Schaeflein did a post about an example how to programmatically upload a file to a document library. The example is in VB.NET and could be very handy to use in custom made WebParts. Thanks for that! :)

Sub ProcessPostedFile(ByVal fileUpload As HtmlControls.HtmlInputFile)
    Try
    ' get the filename and stream
    Dim fn As String = System.IO.Path.GetFileName(fileUpload.PostedFile.FileName)
    Dim stm As System.IO.Stream = fileUpload.PostedFile.InputStream
    Dim contents(CInt(stm.Length)) As Byte

    stm.Read(contents, 0, CInt(stm.Length))
    stm.Close()

    ' get the library path
    Dim docLibPath As String = Configuration.ConfigurationSettings.AppSettings("DocUploadPath")
    ' first, get the site containing the library
    Dim site As SPSite = New SPSite(docLibPath)
    Dim web As SPWeb = site.OpenWeb
    ' then get the folder
    Dim docFolder As SPFolder = web.GetFolder(docLibPath)

    ' delete the file if it exists
    Dim docFile As SPFile
    Try
        docFile = docFolder.Files(fn)
    Catch ex As Exception
    End Try

    If Not docFile Is Nothing Then
        docFolder.Files.Delete(fn)
    End If

    ' save the file
    docFile = docFolder.Files.Add(fn, contents)

    Catch ex As Exception
        Context.Trace.Warn(ex.ToString)
    End Try
End Sub

http://sharepointblogs.com/SPDiary/archive/2005/07/12/2632.aspx

Article written by Bil Simser doing the same upload using a HTTP PUT. Meaning that you could use it from any place and not only on the SharePoint server.

http://weblogs.asp.net/bsimser/archive/2004/06/06/149673.aspx

Wednesday, July 13, 2005 7:25:44 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint | VB.NET  | 

Patrick Tisseghem pointed out to us a nice article by Christophe Lauer which has created a sample application demonstrating the concept of programming against the Desktop Search API. I'm using the Desktop Search myself and find it incredible usefull. You can download the sample application at Christophe Lauer his site.

http://blogs.microsoft.fr/clauer/archive/2005/07/09/4563.aspx

Wednesday, July 13, 2005 7:17:16 AM (GMT Daylight Time, UTC+01:00)  #    Comments [3]   Microsoft  | 
# Monday, July 11, 2005

Hi there all,

Maybe some of you already noticed, my blog moved to a new location. The new location is http://net.bloggix.com.

For all those people reading my blog, thank you all!! :)

The old RSS feed is still working but will be gone in some time. A new RSS feed is available at: http://net.bloggix.com/SyndicationService.asmx/GetRss

Thanks :)

Alex

Monday, July 11, 2005 4:36:09 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]    | 

At the blog of Stramit's SharePoint Blog a great article explains how to create rounded header corners for a WebPart by just using CSS styles. 2 cells and 2 styles are used namely: ms-WPTitle and ms-WPHeader.

Before

After

http://blog.spsclerics.com/archive/2005/07/11/5421.aspx

 

Monday, July 11, 2005 1:24:12 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 

One of my collegea pointed out a link to "patterns & practices Enterprise Library - June 2005" containing the following as stated on the website of Microsoft:

"The patterns & practices Enterprise Library is a library of Application Blocks designed to assist developers with common enterprise development challenges. Application Blocks are a type of guidance, provided as source code, that can be used as-is, extended or modified by developers for use on enterprise development projects. The June 2005 release of Enterprise Library is a minor update of the original version released in January 2005. Enterprise Library features new and updated versions of application blocks that were previously available as stand-alone blocks. All blocks included in Enterprise Library have been updated with a particular focus on consistency, extensibility, ease of use and integration."

http://www.microsoft.com/downloads/details.aspx?familyid=A7D2A109-660E-444E-945A-6B32AF1581B3&displaylang=en

A must have for every developer :) Thanks Stef!!

Monday, July 11, 2005 7:31:31 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Microsoft  | 

Angus Logan has been using AJAX.NET under SharePoint and came accross a "cast exception" when using RegisterTypeForAjax. He explains in his article a solution for this by adding manually the client side references to AJAX.NET.

http://msmvps.com/anguslogan/archive/2005/07/09/56884.aspx

Monday, July 11, 2005 7:05:40 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Monday, July 04, 2005

The new Office Business Scorecard Server 2005 Beta 1 is available with the following features and benefits

  • Align actions with strategy
  • Gain complete insight in context
  • Collaborate on business management and action.
  • Empower employees to monitor and deliver against key metrics
  • Achieve extensible functionality

The Beta software can be downloaded using the following link:

http://msdn.microsoft.com/isv/technology/bss/beta/default.aspx

Rumours says that in the last weeks of july beta 2 will be released. It is worth while waiting for that version to start with :)

Monday, July 04, 2005 7:23:57 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Friday, July 01, 2005

 If you use for example a Repeater and you do not want to show some field from the DataSource based on a expression, you could use the following solution. This example hides the year when the year in the DataSource is zero.

<asp:Repeater runat="server" id="rptGroup">
   <HeaderTemplate>
      <table>
   </HeaderTemplate>
   <ItemTemplate>
      <tr><td>
         <asp:Label id="lbl" runat="server" 
            Visible='<%#DisplayYear(DataBinder.Eval(Container.DataItem, "year"))%>'>
            <%#DataBinder.Eval(Container.DataItem, "year")%>
         </asp:Label>
      </td></tr>
   </ItemTemplate>
   <FooterTemplate>
      </table>
   </FooterTemplate>
</asp:Repeater>

In the code-behind the following method is added:

public bool DisplayYear(object item)
{
   int year = 0;

   try
   {
      year = Convert.ToInt32(item);
   }
   catch(exception)
   {
   }

   return year != 0;
}

<%#DataBinder.Eval(Container.DataItem, "wi_area")%>
<%#DataBinder.Eval(Container.DataItem, "wi_year")%><%#DataBinder.Eval(Container.DataItem, "co_name")%><%#DataBinder.Eval(Container.DataItem, "wi_amount")%><%#DataBinder.Eval(Container.DataItem, "wi_price", "{0:f}")%>
Copyright © 2012 Alexander Meijers. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: