<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>SharePoint Designer</title>
        <link>http://geekswithblogs.net/shehan/category/8423.aspx</link>
        <description>SharePoint Designer</description>
        <language>en-US</language>
        <copyright>shehan</copyright>
        <managingEditor>digitalshehan@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Display the users IP Address in a Data View Web Part</title>
            <link>http://geekswithblogs.net/shehan/archive/2009/10/14/display-the-users-ip-address-in-a-data-view-web.aspx</link>
            <description>&lt;p&gt;Quite simple really :)&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open up an existing DVWP or create one.&lt;/li&gt;    &lt;li&gt;Right click the DVWP and select ‘Common Data View Tasks’ (or click the little arrow that appears on the top right of the DVWP)&lt;/li&gt;    &lt;li&gt;Click the ‘Parameters’ link&lt;/li&gt;    &lt;li&gt;In the dialog that opens up click the ‘New Parameter’ button.&lt;/li&gt;    &lt;li&gt;Provide a name for the parameter (e.g. IPAddress)&lt;/li&gt;    &lt;li&gt;In the ‘Parameter Source’ dropdown select ‘Server Variable’&lt;/li&gt;    &lt;li&gt;In the ‘Server Variable Name’ text box enter REMOTE_ADDR&lt;/li&gt;    &lt;li&gt;Leave the ‘Default Value’ text box empty&lt;/li&gt;    &lt;li&gt;Click OK&lt;/li&gt;    &lt;li&gt;Now switch to the code view and go to the place where you want the IPAddress to appear and type the following: &lt;/li&gt;    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:value-of&lt;/span&gt; &lt;span class="attr"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;="$IPAddress"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt; &lt;/p&gt;

  &lt;p&gt;Thats it! Save and open the page containing the DVWP and it should show you you’re IPAddress. I’ve only been able to test it on the intranet and it works fine. If you want to display values of other server variables you can add more parameters and provide the appropriate variable name.&lt;/p&gt;

  &lt;p&gt;Here’s a list of server variables: &lt;a title="http://www.w3schools.com/asp/coll_servervariables.asp" href="http://www.w3schools.com/asp/coll_servervariables.asp" target="_blank"&gt;http://www.w3schools.com/asp/coll_servervariables.asp&lt;/a&gt;&lt;/p&gt;

  &lt;p&gt; &lt;/p&gt;

  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d7be2990-df61-4e33-b9fc-b3cbdea26e1a" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SharePoint+Designer" rel="tag"&gt;SharePoint Designer&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DataViewWebPart" rel="tag"&gt;DataViewWebPart&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Server+Variables" rel="tag"&gt;Server Variables&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IP+Address" rel="tag"&gt;IP Address&lt;/a&gt;&lt;/div&gt;
  &lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;/ol&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135488"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135488" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/shehan/aggbug/135488.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>shehan</dc:creator>
            <guid>http://geekswithblogs.net/shehan/archive/2009/10/14/display-the-users-ip-address-in-a-data-view-web.aspx</guid>
            <pubDate>Thu, 15 Oct 2009 09:20:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/shehan/comments/135488.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/shehan/archive/2009/10/14/display-the-users-ip-address-in-a-data-view-web.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/shehan/comments/commentRss/135488.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/shehan/services/trackbacks/135488.aspx</trackback:ping>
        </item>
        <item>
            <title>Data View Web Part error in SharePoint Designer</title>
            <link>http://geekswithblogs.net/shehan/archive/2009/10/13/data-view-web-part-error-in-sharepoint-designer.aspx</link>
            <description>&lt;p&gt;When I updated the ‘Filter Criteria’ of a fully functioning DVWP through SharePoint designer I was presented with the following error:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;The server returned a non-specific error when trying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Took me a while to figure it out. This is what caused it and how to fix it:&lt;/p&gt;  &lt;p&gt;When you create a DWVP, SPDesigner adds a parameter called ListID and assigns it the GUID value of the list. I’m sure that you know that in order to make a DVWP ‘portable’ you need to replace ‘ListID’ with ‘ListName’ and the GUID value with the name of the list. This doesn’t break the DVWP’s functionality and lets you use in on any site that has a list with the same name and columns.&lt;/p&gt;  &lt;p&gt;However, if you try to edit the filter condition of this ‘portable’ DVWP from the DVWP’s common task pane you’re bound to encounter the above error. The way to recover is to change back ListName to ListID and assign it the GUID value of the list. Once this is done you can make the filter changes and SPDesigner will automatically refresh the DVWP with the correct items. Once you’re satisfied  with the query make the DVWP ‘portable’ like you initially did and add it to your site.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fb1a3c7b-5f5d-42d3-aa0c-29351c939ace" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SharePoint+Designer" rel="tag"&gt;SharePoint Designer&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DataViewWebPart" rel="tag"&gt;DataViewWebPart&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DVWP" rel="tag"&gt;DVWP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Error" rel="tag"&gt;Error&lt;/a&gt;,&lt;a href="http://technorati.com/tags/List" rel="tag"&gt;List&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135487"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135487" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/shehan/aggbug/135487.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>shehan</dc:creator>
            <guid>http://geekswithblogs.net/shehan/archive/2009/10/13/data-view-web-part-error-in-sharepoint-designer.aspx</guid>
            <pubDate>Wed, 14 Oct 2009 09:08:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/shehan/comments/135487.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/shehan/archive/2009/10/13/data-view-web-part-error-in-sharepoint-designer.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/shehan/comments/commentRss/135487.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/shehan/services/trackbacks/135487.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint Designer 2007 is now FREE!</title>
            <link>http://geekswithblogs.net/shehan/archive/2009/04/02/sharepoint-designer-2007-is-now-free.aspx</link>
            <description>&lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=baa3ad86-bfc1-4bd4-9812-d9e710d44f42"&gt;Download it from here!&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
sweet!&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=130678"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=130678" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/shehan/aggbug/130678.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>shehan</dc:creator>
            <guid>http://geekswithblogs.net/shehan/archive/2009/04/02/sharepoint-designer-2007-is-now-free.aspx</guid>
            <pubDate>Fri, 03 Apr 2009 08:11:39 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/shehan/comments/130678.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/shehan/archive/2009/04/02/sharepoint-designer-2007-is-now-free.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/shehan/comments/commentRss/130678.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/shehan/services/trackbacks/130678.aspx</trackback:ping>
        </item>
        <item>
            <title>Truncate the characters displayed in a blog post</title>
            <link>http://geekswithblogs.net/shehan/archive/2008/07/08/truncate-the-characters-displayed-in-a-blog-post.aspx</link>
            <description>&lt;p&gt;This is how to reduce the number of characters displayed in a blog post on the default.aspx page of a blog site created from the OOTB SharePoint blog template.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Open up the site in SharePoint Designer&lt;/li&gt;
    &lt;li&gt;Open the default.aspx and switch to Code View&lt;/li&gt;
    &lt;li&gt;Perform a Find &amp;amp; Replace for the following:
    &lt;ul&gt;
        &lt;li&gt;Find-
        &lt;ul&gt;
            &lt;li&gt;
            &lt;pre class="csharpcode"&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;Field Name="Body"/&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;/pre&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;/li&gt;
        &lt;style type="text/css"&gt;&lt;![CDATA[csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
]]&gt;&lt;/style&gt;
        &lt;li&gt;Replace-
        &lt;ul&gt;
            &lt;li&gt;
            &lt;pre class="csharpcode"&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;Limit Len="99" IgnoreTags="TRUE" MoreText="..."&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;Column Name=&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;Body&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;/&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/Limit&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;/pre&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="attr"&gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class="csharpcode"&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/shehan/WindowsLiveWriter/Truncatethecharactersdisplayedinablogpos_D973/image_4.png"&gt;&lt;img height="447" border="0" width="582" style="border: 0px none ;" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/shehan/WindowsLiveWriter/Truncatethecharactersdisplayedinablogpos_D973/image_thumb_1.png" /&gt;&lt;/a&gt; &lt;/pre&gt;
&lt;pre class="csharpcode"&gt; &lt;/pre&gt;
&lt;p&gt;This would limit the number of characters to 99 and display the text contained in the MoreText attribute as the last characters. Check out &lt;a href="http://msdn.microsoft.com/en-us/library/ms440854.aspx" target="_blank"&gt;this&lt;/a&gt; for more info on the Limit element.&lt;/p&gt;
&lt;p&gt;Do remember to back up the page before attempting this just in case.... ;)&lt;/p&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
]]&gt;&lt;/style&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123641"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123641" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/shehan/aggbug/123641.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>shehan</dc:creator>
            <guid>http://geekswithblogs.net/shehan/archive/2008/07/08/truncate-the-characters-displayed-in-a-blog-post.aspx</guid>
            <pubDate>Tue, 08 Jul 2008 21:35:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/shehan/comments/123641.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/shehan/archive/2008/07/08/truncate-the-characters-displayed-in-a-blog-post.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/shehan/comments/commentRss/123641.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/shehan/services/trackbacks/123641.aspx</trackback:ping>
        </item>
    </channel>
</rss>