Thursday, October 25, 2007
SharePoint vs Developer
A SharePoint song related to the story:
Tuesday, October 23, 2007
Style the AutoCompleteExtender
- Link the textbox with the 'ms-long' class. This CSS class provides the style for the list item metadata fields within SharePoint.
- Make a Div element that refers to the 'ms-long' class.
First we need to style the textbox:
Then style the AutoCompleteExtender dropdownlist:
- Make a Div element just above the AutoCompleteExtenderTag:
- Set the AutoCompleteExtender property [CompletionListElementID]:
Result:
Monday, October 22, 2007
Use ASP.NET AJAX framework with WSS 3.0
First I was afraid to begin with this task because of the rumors about the ASP.NET AJAX integration with Office SharePoint Server 2007 and Windows SharePoint Services 3.0 . After all, it turned out better than I expected.
What do we want to achieve:
I think it's unnecessary to write down an how-to. I made use of the following URL's to accomplish it.
- Create an AutoComplete WebPart
This article let you understand how to link a textbox & a webservice with the AutoComplete extender. Note: The webservice is necessary to retrieve the data. - ASP.Net 2.0 AJAX Extensions and the ASP.Net 2.0 AJAX Control Toolkit
- Very important links to do a make-over of the web.config: Ajax ready
if the link above doesn't work - take a look at Wss site configuration - If you don't know how to make a Custom Field Type - Here's an example
The code beneath shows how to define the ascx control [Defines a SharePoint:RenderingTemplate element whichs tells SharePoint how to render your control].
Missing attributes in the AutoCompleteExtender tag:
ServicePath=http://moss/_layouts/WebService/WebService.asmx
ServiceMethod="GetEmployees" MinimumPrefixLength="1"
Chinese? Watch this video: How do I use the ASP.NET AJAX AutoComplete control?
So that's it... Questions / Comments? Feel free!
Saturday, October 20, 2007
How to remove a bad webpart from a page?
Resolution:
Append ?Contents=1 to the webpart page's URL to display the Webpart Maintenance Page. On that page you can delete the malefactor.
Example: http://moss/default.aspx?contents=1
Wednesday, October 17, 2007
SharePoint 2007 Development: Interactive Training Course DVD
This DVD looks great!...
How to make a basic workflow?
ow... I almost forget to say that there's also a next tutorial (making an initiation form on the DiceGame)
Have fun!
Tuesday, October 16, 2007
Custom Timer Job
If you don't know how to make a CTJ? Take a look at: Example of a Custom Timer Job
How to debug a Custom Timer Job?
After installing and activating the CTJ - Feature
(Make sure that the code in the execute() method runs every minute. It takes less time to debug)
- Set a breakpoint somewhere in your code.
- Click 'Debug' in the toolbar (Visual Studio 2005)
- Click 'Attach to process'
- Select 'OWSTimer.exe'
- Everytime the code is being executed, the debugger starts working.
- Now you can enjoy 'debugging'
How to access the web.config within a Custom Timer Job?
Configuration config =
WebConfigurationManager.OpenWebConfiguration("/", "Sharepoint - 80");
string value = config.AppSettings.Settings["keyName"].value;
Hope , these tips save some developer time :)
Monday, October 15, 2007
LDAP attributes
Getting accountnames from UserProfile Database
using (SPSite site = new SPSite(http://servername/))
{
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
foreach (UserProfile profile in profileManager)
{
Console.WriteLine(profile[PropertyConstants.AccountName]);
}
}