SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Saturday, July 23, 2005

Update: The Image Upload Web Part has been updated.

Heather Solomon blogged about end-user-focused web parts. (Be sure to look at the comments for links to many others.) All are very valid points.

I have a small but helpful contribution: The ImageUpload Web Part.

On a WSS Team site, the default template has an Image Web Part that displays the Windows Logo. I have never seen this logo on a production site. To change the image is easy enough for users familiar with the Web Part page model: Open the tool pane and change the location of the image. This is where it gets difficult for end-users.

What if the image is on the end-user's computer? Most likely, they email the file to the webmaster/developer. It is then uploaded to web server and the URL emailed back to the user. (Or the webmaster/developer is updating the web part.) More industrious users will post the image to a photo gallery. Some will even determine the URL. But there is an easier way.

The ImageUpload Web Part displays a form with a file upload input box. The end user can click the browse button and select the image. The web part stores the image in a document library and automatically remembers the location (URL) and renders the <IMG> tag correctly.

Download the CAB file and source code.

The web part requires a setting in web.config with the location to store the images. And, the end user must have permission to store items in that library. (This second restriction could be alleviated using impersonation techniques from Todd Bleeker or Victor Vogelpoel or Jay Nathan.)

Saturday, July 23, 2005 4:49:11 PM (Central Daylight Time, UTC-05:00)  #    Comments [10]  | 
Saturday, July 23, 2005 4:17:32 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Wednesday, July 20, 2005

In honor of the first manned Moon landing, which took place on July 20, 1969, we’ve added some NASA imagery to the Google Maps interface to help you pay your own visit to our celestial neighbor. Happy lunar surfing. More about Google Moon.

http://moon.google.com/

 

Wednesday, July 20, 2005 10:20:10 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Friday, July 15, 2005

This article made me laugh out loud:

"In fact, hockey has been fixed, in that veterinarian sort way."

"But since this lockout was all about the 10 or so hard-line owners and their unleashed commissioner getting what they wanted at all costs, hats off to them. Preferably with their heads inside, true, but you get what you can at times like this."

Ray Ratto - ESPN.com

Friday, July 15, 2005 10:42:37 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 

The lastest article in my SharePoint series is available on IntranetJournal.com

Customizing the Quick Launch in a WSS Team Site
This month, Paul provides a solution to automate the linking of documents in a Windows SharePoint Services (WSS) document library to the Quick Launch navigation feature.

The article discusses a custom web part. The web part and its source code are available for download.

Friday, July 15, 2005 9:18:21 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Wednesday, July 13, 2005

"The purpose of the SharePoint Utility Suite is to provide a packaged collection of Tools and Utilities showcasing the rich Object Model that is delivered with the SharePoint Product and Technologies SDK (which includes Windows SharePoint Services 2.0 and SharePoint Portal Server 2003). This package includes code and tool examples that SharePoint Developers and SharePoint Administrators might find useful."
http://www.microsoft.com/sharepoint/downloads/components/detail.asp?a=724

Thanks to Jessica Gruber

Wednesday, July 13, 2005 3:46:04 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Tuesday, July 12, 2005

This post is mostly a duplicate and is provided as a reference for others who stop by later.  Thank you to all who participated!

Andrew Connell started us off with good comments (re-posted on his blog).

Arpan Shah found the article entertaining, rather than informative.

Bil Simser would like Mr. Drips to call reality.

Robert Scoble has some ideas.

Maurice Prather has "Five things worth mentioning"

JOPX on SharePoint

The SharingPoint

Ed Brill (IBM)

Daniel McPherson: Only Five Things Wrong with SharePoint

Amanda Murphy discusses the vision

Bil Simser gets us turned around and discusses some positive features of SharePoint.

"Wish List" post by Larry Borsato

Thoughts about the community and the team from Patrick Tisseghem.

Eli Robillard: response to article and discussion of weaknesses.

Tuesday, July 12, 2005 10:27:40 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 

In response to a post in the ASP.Net forums, here is a routine to upload a file to a document library.

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

Tuesday, July 12, 2005 12:43:24 PM (Central Daylight Time, UTC-05:00)  #    Comments [1]  | 
# Monday, July 11, 2005

File containing the web part described in my Intranet Journal article series.

DocLibQuickLaunch.zip (13.4 KB)

Monday, July 11, 2005 12:03:57 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 

Only Five Things Wrong with SharePoint

Well, thats what I think the headline should have been. <sly grin>

Monday, July 11, 2005 9:02:46 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
Renaud Comte has an example of using CSS to alter the look of the WebPart title bars. (The formatting is a bit off, but the CSS is near the bottom.)
Monday, July 11, 2005 8:21:35 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Sunday, July 10, 2005

Thanks to all who have joined in! I'm sure that the net result will be a better product!

[UPDATE: This post is being continuously updated as I become aware of other comments.]

Andrew Connell started us off with good comments (re-posted on his blog).

Arpan Shah found the article entertaining, rather than informative.

Bil Simser would like Mr. Drips to call reality.

Robert Scoble has some ideas.

Maurice Prather has "Five things worth mentioning"

JOPX on SharePoint

The SharingPoint

Ed Brill (IBM)

Daniel McPherson: Only Five Things Wrong with SharePoint

Bil Simser gets us turned around and discusses some positive features of SharePoint.

"Wish List" post by Larry Borsato

Thoughts about the community and the team from Patrick Tisseghem.

Eli Robillard

Sunday, July 10, 2005 1:35:15 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Friday, July 08, 2005

George Tsiokos put together a creative solution for displaying RSS/ATOM feeds in a web part page. His SharePoint RSS/ATOM reader service will create a .DWP for a Data View Web Part. No assembly to install; no editing of web.config; no programmer involvement; I LOVE IT!!!

There is also a downloadable version for the technically advanced. Thank you George!

Friday, July 08, 2005 9:10:34 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008, Paul Schaeflein

Send mail to the author(s) E-mail