<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
 <channel>
  <title>iMadalina on .Life</title>
  <link>http://madalina.blog.com/</link>
  <description>Copyright @ MDL  2006-2008</description>
  <language>en-US</language>
  <pubDate>Mon, 18 Aug 2008 12:47:32 +0200</pubDate>
  <lastBuildDate>Mon, 18 Aug 2008 12:47:32 +0200</lastBuildDate>
  <generator>Blog.com</generator>
    <item>
   <guid>http://madalina.blog.com/3547650/</guid>
   <title>How to get the current SharePoint user full name from InfoPath codebehind</title>
   <link>http://madalina.blog.com/3547650/</link>
   <description><font face="verdana,geneva"><font size="2"><strong>Scenario:</strong> SharePoint Forms Library and an InfoPath Form<br />
<br />
<strong>Question:</strong> How to get the FULL NAME of the currently logged in user from code? No hardcoded web service URL.<br />
<br />
<strong>Solution:</strong> <font color="#2B91AF">SPContext</font></font></font><font size="2" face="verdana,geneva">.Current.Web.CurrentUser.Name<br />
All you need is to add the Windows SharePoint Services reference to your project and the following 'using/Imports' directive in the codebehind file:<br />
<br /></font>
<p><font size="2" face="verdana,geneva"><font color="#0000FF">using</font></font> <font size="2" face="verdana,geneva">Microsoft.SharePoint;<br />
&#160;</font></p></description>
   <author>Madalina</author>
   <pubDate>Mon, 18 Aug 2008 14:32:07 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3518275/</guid>
   <title>Programatically removing an HttpModule from SharePoint Web.config (2)</title>
   <link>http://madalina.blog.com/3518275/</link>
   <description><div>
<div style="text-align: left">
<div style="text-align: justify"><font size="2" face="verdana,geneva"><font size="2" face="verdana,geneva">In one of my previous posts (that you can find</font> <a target="_blank" href="http://madalina.blog.com/3226609/"><font size="2" face="verdana,geneva">here</font></a><font size="2" face="verdana,geneva">) I described how I managed to add a HttpModule tag&#160;to the web.config. The issue still remaining was the removal of that tag from the web.config, that I needed to do in the uninstallation process (in my case feature deactivating). At that time I used a remove tag.&#160;<br />
<br />
Although web.config file sees no problem in&#160;duplicate add tags, the same thing does NOT happen with the remove tags. If two or more remove tags of the same module are present in the web.config file, an error is generated - so down the drain goes our solution if two or more install-uninstall sequences occur on the same web application.<br />
<br />
What is the solution to this problem? I found it in one of Andrew Connell's books - "Professional SharePoint 2007 Web Content Management Development" (find it in my Books sidebar). It is a fairly simple solution: at Http Module installation in a SharePoint site you add a property to the site to signal that the Http Module should be applied there. In the Http Module code behind you check if that property exists before letting the Http Module do what it is meant to do. At unistallation you remove the property, or make it null. And <em>Voila!</em> - although the tag in the web.config stands, the module will not act on sites unless they have the property it is looking for.</font></font></div>
<font size="2" face="verdana,geneva"><br />
&#160;</font></div>
</div></description>
   <author>Madalina</author>
   <pubDate>Wed, 13 Aug 2008 15:12:14 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3417291/</guid>
   <title>Sinteza Zilei</title>
   <link>http://madalina.blog.com/3417291/</link>
   <description><p>Nu cunoasterea se vinde, ci rezultatul cunoasterii. Asa ca nu ma mai intreba CUM !<br />
&#160;</p></description>
   <author>Madalina</author>
   <pubDate>Tue, 29 Jul 2008 15:52:55 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3417276/</guid>
   <title>Great Coders...</title>
   <link>http://madalina.blog.com/3417276/</link>
   <description><div style="text-align: center">
<p>&#160;<a target="_blank" href="http://www.microsoft.com/learning/mcp/mcts/default.mspx"><img align="bottom" src="http://amadeo.blog.com/repository/198660/3381169.jpg" /></a><br />
&#160;</p>
</div></description>
   <author>Madalina</author>
   <pubDate>Tue, 29 Jul 2008 15:48:01 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3332448/</guid>
   <title>Sinteza zilei</title>
   <link>http://madalina.blog.com/3332448/</link>
   <description><p><font size="2" face="verdana,geneva">Clientii trebuie sa inteleaga ca nu ORICE este posibil, oricat de multi bani (li se pare ca) platesc - ca doar nu suntem la ta*fe.<br />
&#160;</font></p></description>
   <author>Madalina</author>
   <pubDate>Wed, 16 Jul 2008 19:20:08 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3249363/</guid>
   <title>SharePoint customization - applying a theme programmatically</title>
   <link>http://madalina.blog.com/3249363/</link>
   <description><font face="verdana,geneva"><font size="2">SharePoint sites can be customized through MasterPages and/or Themes. There are 2 main&#160;differences between these two methods:<br />
1. masterpages allow you to rebuild the design from scratch - as in move the elements around on the page as you like - but do not affect system pages<br />
2. themes are made up of css files only, allowing you just to skin&#160;a SharePoint site, but are also applied on the system pages.<br />
<br />
Customizing a site generally&#160;means skinning all its pages. So that the user doesn't get confused as of why some pages look different than others, or at least to give the system pages almost the same look and feel as the rest of the pages.<br />
Automating the masterpage install is easy -you create a feature and write code in the</font></font> <font size="+0"><font size="2" face="verdana,geneva">FeatureActivated event, code that sets your masterpage as the default and custom master(details on that feature are to come in a future post).<br />
But what about applying a theme? The general procedure would be to have the administrator go on the server and copy some files on the Windows drive and then modify&#160;an XML file&#160;so that SharePoint can read the theme and display it&#160;on the Site Settings &gt; Site Theme page. One of the many posts that explains this method is</font> <a target="_blank" href="http://msmvps.com/blogs/anguslogan/archive/2005/10/15/70875.aspx"><font size="2" face="verdana,geneva">this</font></a><font size="2" face="verdana,geneva">&#160;one.<br />
<br />
But what if you want to do this programmatically? With a feature, like you would do when you deploy a masterpage.<br />
<br />
Well, simple enough, this is possible. As long as the theme exists in the THEMES directory, SharePoint can retrieve it. The only reason you modify the spthemes.xml is for SharePoint to display the theme in the Themes list. So if you place the theme in the Themes directory (just by copying it there in a bat file for example)&#160;you can use code to apply it:<br /></font></font>
<p><font size="+0"><font size="2"><font face="verdana,geneva">web.ApplyTheme(</font><font color="#FF0000" face="verdana,geneva">"MyTHEME"</font></font><font size="2"><font face="verdana,geneva">);<br />
<br />
Since we are here, the way to revert a SharePoint&#160;site to the default theme isn't&#160;web.ApplyTheme(<font color="#FF0000">"Default"</font></font><font face="verdana,geneva">), but web.ApplyTheme(<font color="#FF0000">"none"</font></font></font><font size="2" face="verdana,geneva">).<br />
<br />
And there you go - you can programmatically apply a theme to a site. And the way to make the theme "visible" to the user is to have it as a feature instead of having it in the Themes list.<br />
<br /></font></font></p></description>
   <author>Madalina</author>
   <pubDate>Tue, 24 Jun 2008 16:56:17 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3226609/</guid>
   <title>Programatically add (and remove) an HttpModule to SharePoint Web.config</title>
   <link>http://madalina.blog.com/3226609/</link>
   <description><p><font size="2" face="verdana,geneva">Sometimes you need to use an HttpHandler or HttpModule&#160;in a SharePoint application - I am using one to handle the requests to the system pages and to replace the application.master on them with my own master. To install this&#160;module I need to register the dll in the GAC and to add a HttpModule declaration in the web.config.<br />
<br />
To modify the web.config programatically in SharePoint you can use the SPWebConfigModification class. There are many examples on the net about using&#160;this class, and the one I started with is</font> <a target="_blank" href="http://sharepointsolutions.blogspot.com/2006/12/using-spwebconfigmodificat_116736917110571614.html"><font size="2" face="verdana,geneva">this</font></a> <font size="2" face="verdana,geneva">one. <span style="font-size: 9pt; line-height: 115%; font-family: 'Verdana','sans-serif'">Unfortunately</span>, this example, along with all the others on the subject are healing with adding HttpHandler elements, while I needed to play with an&#160;HttpModule element. The example does apply to me for adding an element, but&#160;the issue arises when I need to remove it.<br />
<br />
The SPWebConfigModification class has a <em>Name</em>&#160;property. This property should be set to the relative XPath to the modification and maps to the <em>Path</em> attribute of an HttpHandler element. The property is used to locate the element when you need to remove it. <span style="font-size: 9pt; line-height: 115%; font-family: 'Verdana','sans-serif'">Unfortunately</span>, the HttpModule element does not have the <em>Path</em> attribute. So no matter how I tried it, I could not remove the element from the web.config.<br />
<br />
The solution came while I was reading a different post about web.config inheritance: the tag. If you want to remove the HttpModule element, add a tag to the web.config.<br /></font></p></description>
   <author>Madalina</author>
   <pubDate>Tue, 17 Jun 2008 12:34:33 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3189720/</guid>
   <title>Don't think outside the box, BE outside the box</title>
   <link>http://madalina.blog.com/3189720/</link>
   <description><div style="text-align: center"></div>
<div style="text-align: center"></div>
<font size="2" face="verdana,geneva">I was browsing</font> <a target="_blank" href="http://www.emag.ro"><font size="2" face="verdana,geneva">emag</font></a> <font size="2" face="verdana,geneva">today, and as usual, I went to see what is new in the laptop department. And I found the new Dell 1525, as colorful as ever. I have a Dell myself, an Inspiron 1520 in pink, but this new model is a step further :)</font><br />
<br />
<div style="text-align: center"><img src="http://amadeo.blog.com/repository/198660/3234465.jpg" /></div>
<br />
<font size="2" face="verdana,geneva">And I started thinking: why does everybody own a gray or black (or dark blue maybe) laptop? Do they want to "fit in"? Fit in where? Underground? Don't get me wrong, I'm not Flower Power :) but I really do ask myself the never ending "why??!?!?" when it comes to this. I heard the&#160;"classy"&#160;card in relation to the "black laptop" trend. Is it really&#160;classier? Do you receive more respect when you, say, go on a conference stage and present ASP .NET (sorry, my thing)&#160;in front of an audience from a black laptop? Or are you just another one of many, just a shadow in the crowd?...<br />
<br />
Nowadays there are many smart people around, talented people, successful people. The days when you asked "how many of you developed a workflow"&#160;in a gathering&#160;and one or two people at most&#160;raised their hands are gone. Today information is something that everybody has. Everybody&#160;has a rocket model at home.&#160;So why fit in? Shouldn't we stand out?<br />
You will say that standing out should be related to what you say not how you look. Yeah, right. iPhone is aaaaaaall about the software, that's why you would replace your PDA with it in a minute. Last conference you went to - which presenter do you remember? The smart one? Or the smart one that said it all in the right tone and moved like he was&#160;delivering the&#160;information with his&#160;body language and you don't even know what background color&#160;the PowerPoint slides were on? It's all about presentation, my friends.<br /></font>
<div style="text-align: center"><a target="_blank" href="http://www.schtickers.com/catalog/product_info.php?products_id=212"><img width="566" src="http://amadeo.blog.com/repository/198660/3234478.jpg" height="204" style="border: 0px" /></a></div>
<br />
<font size="2" face="verdana,geneva">So don't you dare start rolling your eyes when someone comes into the room and takes out of his/her bag a green tattooed&#160;laptop - as he/she is the bold one in the room. You are only blending in. With your&#160;gray laptop. Aren't they all...<br /></font><br />
<div style="text-align: center"><img src="http://amadeo.blog.com/repository/198660/3234469.jpg" /></div></description>
   <author>Madalina</author>
   <pubDate>Thu, 05 Jun 2008 19:08:41 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3175825/</guid>
   <title>How development finally pays off</title>
   <link>http://madalina.blog.com/3175825/</link>
   <description><font size="2" face="verdana,geneva">I am a web developer. Not a life-saving job. At all.<br />
Being a software developer is an abstract job. When you go home in the evening, you can't bring anything useful with you. Knowing what Response.Redirect() means, does not help you climb up a tree to save the cat. Learning about stacks in school does not make it less painfull when, at the grocery store, someone ignores the line and skips the waiting part to go ahead. On the contrary.<br />
<br />
But today I finally found a use for my being a web dev :D&#160; I was looking at</font> <a href="http://www.monster.com"><font size="2" face="verdana,geneva">monster.com</font></a><font size="2" face="verdana,geneva">. You know, the job search engine. It is divided into countries. If you want to look for a job in sunny&#160;Mexico, you have a site for Mexico. And so on. I found it nice at the beginning. But frustrating at a point. Being a freelance consultant, I don't really care where the job comes from as long as it is the job I am looking for. So after going on many of the sites, I started to ask myself why is it that you don't have a Monster site where you can search for the job you want in all the listings of all the countries?<br />
<br />
If you are a web dev, you do :D Browse to any site, put in the key word(s) of your search&#160;and hit enter. Let's suppose you are searching for "asp net". Results from the current country&#160;will be displayed as well as the page URL:<br /></font> <a href="http://jobsearch.monster.com/Search.aspx?re=130&amp;cy=us&amp;brd=1&amp;JSNONREG=1&amp;q=asp+net&amp;rad=20&amp;rad_units=miles"><font size="2" face="verdana,geneva">http://jobsearch.monster.com/Search.aspx?re=130&amp;cy=us&amp;brd=1&amp;JSNONREG=1&amp;q=asp+net&amp;rad=20&amp;rad_units=miles</font></a><br />
<font size="2" face="verdana,geneva">In there you can find the id of the current country and information about the city you&#160;could select(zip code, distance from the city etc). All you really&#160;need here is the keywords you entered. So if you leave the URL at</font> <a href="http://jobsearch.monster.com/Search.aspx?q=asp+net"><font size="2" face="verdana,geneva">http://jobsearch.monster.com/Search.aspx?q=asp+net</font></a><font size="2" face="verdana,geneva">&#160;and hit enter, guess what you will get&#160;- asp net listings from all the countries.<br />
<br />
So yes, 5 years of university, 3 of work... it does pay of to be a web developer in the real world too&#160;=))<br /></font></description>
   <author>Madalina</author>
   <pubDate>Sun, 01 Jun 2008 20:06:38 +0200</pubDate>
  </item>
   <item>
   <guid>http://madalina.blog.com/3165227/</guid>
   <title>SharePoint on Windows Vista</title>
   <link>http://madalina.blog.com/3165227/</link>
   <description><font size="2" face="verdana,geneva">"Are you a SharePoint developer&#160;tired of starting VirtualPC evey morning when you go to work? Are you dissapointed in remote connection speed and how Visual Studio is slow in there? Then this is the post for you!"<br />
<br />
This sounds like a soap opera&#160;commercial :) I have Windows Vista installed on my laptop and I am kind of fond of it... Not only because it does it's job :) but also because I have spent a while installing applications and configuring it. So when I work on a SharePoint web part or a Sharepoint MasterPage design, I need&#160;to use a remote machine.<br />
Not any more though. The</font> <a target="_blank" href="http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx"><font size="2" face="verdana,geneva">Bomboo</font></a> <font size="2" face="verdana,geneva">guys found a solution for that. I tried it and so far I installed WSS 3.0 on my Vista,&#160;created the first site, installed SPD and created a new masterpage. It all worked.<br />
<br />
"Get it today! Available in</font> <a target="_blank" href="http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx"><font size="2" face="verdana,geneva">stores</font></a> <font size="2" face="verdana,geneva">now!"</font></description>
   <author>Madalina</author>
   <pubDate>Thu, 29 May 2008 11:17:21 +0200</pubDate>
  </item>
  </channel>
</rss>