loads of useful information, examples and tutorials pertaining to web development utilizing asp.net, c#, vb, css, xhtml, javascript, sql, xml, ajax and everything else...

 



Advertise Here
C-Sharpener.com - Programming is Easy!  Learn Asp.Net & C# in just days, Guaranteed!

Anonymous Contact Web Part and Code

by naspinski 10/18/2008 11:55:00 AM

Allow your users to send an anonymous contact/comment through your SharePoint site

Recently I was asked to allow anonymous comments on a SharePoint site. Keep in mind that this site already had anonymous access enabled and I suggested just opening a discussion and recommending that users post on it anonymously... that was shot down. Soooo... I built this simple little web part that allows the administrator to set up the anonymous contact form. It requires that the admin set four things:

  • SMTP Server - umm... you need this to send email
  • Mailto Address - whoever is going to get these anonymous contacts
  • From address - the dummy address it is 'coming from'
  • Subject Line - what you want the subject line to be

Set those and you are all done -- pretty simple really. All of the code is included in the solution zip, or if you just want the web part, download the wsp. To deploy it, use the command:
stsadm -o addsolution -filename folder_you_put_the_wsp_in/anonymous_contact.wsp
Just be sure to deploy the solution via central admin and add it in your web part gallery with the 'new' button.





Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

c# | sharepoint | steal some code

Related posts


Comments are closed