Archive

Archive for September, 2008

IDesignTimeHtmlProvider Interface

September 16th, 2008 No comments

You can implement this interface to have a different HTML rendition for your Web parts and controls in SharePoint Designer than what you see in the browser. Well, if that’s what you are looking for, IDesignTimeHtmlProvider interface is definitely your friend!

As you can see in the pictures below , my simple Web part renders two different type of messages at run-time and design-time. For more information see my notes in the community content of this page.

Browser:
idesignviewbrwoser.jpg

SharePoint Desginer:
idesignviewspd.jpg

Categories: MOSS 2007 Tags:

LinkSection

September 15th, 2008 No comments

SharePoint is full of UI buidling bloks that can be reused , either declaretively or programmatically, to build your UI components. In this blog post, I demonstrated how you can leverage LinksTable user control to create a cool-looking link box that mataches out of the box links (Look at Site settings page). There is another user control called LinkSection  (inhertirs Microsoft.SharePoint.WebControls.LinkSection) which gives you more control over other parts of your link box such as Title and Description.

Read my notes on the community content of this page.

linksection.png

Categories: MOSS 2007 Tags:

Web part with Toolbar (Part 2)

September 13th, 2008 No comments

Sometime in January this year , I wrote a blog post here in which I introduced one possible way of adding a Toolbar to a Web part. Although , I am not a big fan on loading user controls dynamically into my Web parts , in order to achieve what I wanted to do , I kind of had to leverage the OOTB toolbar.ascx user control; therefore dynamically load it into the parent control (my Web part).

While the technique in my previous post would work in most of the cases, dynamically loading the control by using LoadControl() method, periodically kept failing on us  in the following scenarios:

a)  In controls deployed to the bin folder and therefore running in partially trusted environments

b) Forms Based Authentication protected sites

And

c) Casting to the base type (ToolBar) in order to call the overloaded functionality.

I was never able to reproduce the issue , but couple fails was convincing enough for me to look for a better technique to add the toolbar chrome to my Web parts. Well, today while I was documenting RepeatedControls class, I found another way to achieve this. Read my notes in the community content of this page.

wpwithtoolbar.png

Source Code is available here: wpwtoolbar2.rar

More details can be found here.

For this technique used in a much bigger scenario click here.

Update 11/28/2010: Bil Simser further expands this example in his blog using TABLE tags instead of DIVs I initially used. His solution looks more real life and is really cool! Make sure you check his blog post here.

Categories: MOSS 2007 Tags:

LinksTable

September 13th, 2008 No comments

If you like the way SharePoint groups related links together and render them in a nice RepeatedControls with that little rectangular image located on the left side of each link (/_layouts/images/setrect.gif) , just be aware that you can easily use the same technique in your application pages and Web parts as well.

Read my notes on the bottom of this page.

untitled.png

Categories: MOSS 2007 Tags:

SharePoint Developers in IRAN

September 12th, 2008 No comments

I just arrived in IRAN and I am gonna stay here for couple days. Boy , it feels so good to be here! I am enjoying every minute of my trip and my family is certainly spoiling me to death like a little kido:)  Believe it or not , I put on couple of kilos right away , because of all this delicious, sexy Persian dishes!

Besides visiting my family and spending quality time with them , I have a very important mission this time around. I am looking into spinning up another development team  with 100% focus on SharePoint products and technology here in IRAN . I will be working with this group on couple of current remote projects with good salary and lots of fun!

I already interviewed three people and quite frankly I am thrilled with their level of expertise in SharePoint. I still have couple spots left , so if you think you are a qualified SharePoint developer , you know the object model ins and outs and you have worked on enterprise-scaled projects , please drop me a line at [myfirstname] AT devhorizon dot com and I will immediately setup a telephonic interview with you. Please remember to attach your resume as well. Please bear in mind that this is not an opportunity for those who want to learn SharePoint. I have a urgent need for expereinced and classic SharePoint developers – hardcore ones in particlar!

BTW, I have been away from IRAN for couple years, so if you know a good place to have some fun these days , let me know. I am a pretty approachable guy , so I don’t mind hanging out with you , Persian SharePoint geeks!

Categories: General, MOSS 2007 Tags: