SharePoint - Development and Programming ForumTopics about development and programming (i.e. web parts, features, etc.), SDKs, and tools (i.e. Visual Studio).© 2009 Microsoft Corporation. All rights reserved.Thu, 26 Nov 2009 05:45:45 Z175b2de3-6a0a-4b73-8882-93446f9133e3http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/31c61416-7abb-4469-a1a5-9cd2c027d96dhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/31c61416-7abb-4469-a1a5-9cd2c027d96dBiztalkGhosthttp://social.technet.microsoft.com/Profile/en-US/?user=BiztalkGhostCustom Webpart for loginHi,<br/><br/>I need a create a webpart for login in aspx. I don't need existing login webparts. I need to deploy this to my site. Please let me know the steps to acheive the same.<hr class="sig">Vijaykishan | http://v2attechhorizon.blogspot.com | Please mark this as answer if it helpsWed, 25 Nov 2009 12:00:45 Z2009-11-26T05:45:45Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/908f3f76-1ef5-4794-97f3-bb28f2efea0ahttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/908f3f76-1ef5-4794-97f3-bb28f2efea0aluke.mcgr[e]gorhttp://social.technet.microsoft.com/Profile/en-US/?user=luke.mcgr%5be%5dgorPackaging an existing webpart as a solutionHi there <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">We have an existing web part which has been successfully deployed to a production environment, however we would like to repackage that webpart as a solution. I have used WSP Builder to do this and then deployed the web part to a dev MOSS server. </div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">However i get an error when trying to add the webpart to a page (<em style="font-weight:inherit;font-style:italic;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">A WebPart or Web Form Control cannon be displayed or imported. The type could not be found or it is not registered as safe)</em>. I suspect this is because it has additional resources that it relies on for example an XML config file, which is not added to the .WSP. Do you have any documentation on packaging web parts and the correct locations for the different components (ie controls, resources, .webpart and .xml config files ect)?</div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">I have confirmed that the dlls used have been deployed correctly to the GAC on the server (so they should be safe anyway), Ive also tried adding it as a safe control in the web.config but neither have changed the error im getting</div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">Thanks</div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial"><br/></div> <div style="font-weight:inherit;font-style:inherit;font-family:inherit;padding:0px;margin:0px;border:0px initial initial">Luke</div>Tue, 24 Nov 2009 19:21:21 Z2009-11-26T05:26:46Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0d69b5b2-86ef-46b9-bde1-9af06dfec003http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0d69b5b2-86ef-46b9-bde1-9af06dfec003PCMA-Developerhttp://social.technet.microsoft.com/Profile/en-US/?user=PCMA-DeveloperList permissionHello All,<br/><br/>I have made some changes to list permissions to only allow users to delete or edit their own tasks and discussion threads.  It works as it should but the problem is the edit and delete options still show in the menus.  How can I either hide these options for items that the user does not own or create an error message saying something like &quot;You do not have permission to edit or delete this item&quot;.Tue, 24 Nov 2009 18:23:33 Z2009-11-26T04:46:41Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b4c1412a-f6cd-4d27-afc8-718075efd100http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b4c1412a-f6cd-4d27-afc8-718075efd100poh81http://social.technet.microsoft.com/Profile/en-US/?user=poh81Meeting WorkspaceHI,<br/> <br/> I am looking at meeting workplace in template, I like it the fact that you can do various things eg create, upload document add attendees etc to a particular meeting.<br/> <br/> however, i am lost when you have weekly meeting for instance, and you want to archive and able to search the old meeting. <br/> <br/> Does MOSS have these such features too? Tue, 24 Nov 2009 10:42:27 Z2009-11-26T04:45:55Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/72ee0697-cb31-4836-8f4f-8f4c4991805bhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/72ee0697-cb31-4836-8f4f-8f4c4991805bUsmanBhattihttp://social.technet.microsoft.com/Profile/en-US/?user=UsmanBhattiMicrosoft Transporter Suite does not migrate embedded documents html anchors from Lotus Notes/Domino into sharepoint<p><strong>Tools Involved</strong>: Lotus Notes/Domino, Sharepoint Server, Microsoft Transporter Suite</p> <p>The Problem involves migrating Rich HTML from Lotus Domino Document Libraries to Sharepoint Discussion Boards using Microsoft Transporter Suite.<br/>Microsoft Transporter successfully moves the rich html documents with all Embedded Documents moved as attachments to the discussion items.<br/>Though Embedded Documents get moved successfully their HTML anchors inside the document html gets lost i.e. There is no sign of the embedded documents left inside the html which used to display as html anchors inside notes/domino documents.<br/>The migrated rich text is not much usefull this way.<br/>We are left to using partial search and replace solutions that will not prove usefull eventually.<br/><br/>Please help with this. Is there some default setting inside transporter that I need to override to get this done?<br/><br/>Best Regards,<br/>Muhammad Usman Jamil</p>Thu, 26 Nov 2009 01:54:59 Z2009-11-26T04:38:11Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d5d9ac6b-7575-4365-9f73-d0bac23b4abahttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d5d9ac6b-7575-4365-9f73-d0bac23b4abaDorfihttp://social.technet.microsoft.com/Profile/en-US/?user=DorfiAdd Items to SPListItemCollectionHi,<br/><br/>i have a loop to get different items with a spquery in my collection, at the end of the loop i would like to sum these items to one big collection of all items...<br/><br/>code example:<br/><br/> <pre lang="x-c#">SPList list = web.Lists[&quot;Sitzungen&quot;]; SPQuery q = new SPQuery(); SPQuery sitzungen = new SPQuery(); sitzungen.Query = &quot;&lt;Where&gt;&lt;IsNotNull&gt;&lt;FieldRef Name='Title' /&gt;&lt;/IsNotNull&gt;&lt;/Where&gt;&lt;OrderBy&gt;&lt;FieldRef Name='Datum' Ascending='False'/&gt;&lt;/OrderBy&gt;&quot;; SPListItemCollection sitzcol = list.GetItems(sitzungen); SPListItemCollection alleBeschlüsse = null; foreach (SPListItem c in sitzcol) { q.Query = &quot;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='ContentType'/&gt;&lt;Value Type='Text'&gt;Beschluss&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&quot;; q.ViewAttributes = &quot;Scope=\&quot;Recursive\&quot;&quot;; if (c.Folder != null) q.Folder = c.Folder; SPListItemCollection col = list.GetItems(q); }</pre> please dont look @query text, cause they are nonsense is just for a test program...<br/>at the end i get the items i want in the SpistItemCollection &quot;col&quot; now i want sum in every loop the items of these collection to get all my items...<br/><br/>thanks, markusWed, 25 Nov 2009 13:02:52 Z2009-11-26T04:26:56Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e67360ba-dc42-4e3e-9f81-38586faa90eahttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e67360ba-dc42-4e3e-9f81-38586faa90eaHemendra Agrawalhttp://social.technet.microsoft.com/Profile/en-US/?user=Hemendra%20AgrawalGet all items from document library folder or subfolderHi ppl,<br/> <br/> I am wrote below code for sending an email, when item is added/updated through timer job.<br/> <br/> Code is working fine, only problem is: my document library has many folders and subfolders. when i added/update the item in folder that item data is not coming in email.  Pls tell me how can i fetch all items from folder / subfolder. <br/> <br/> <br/> <br/> public override void Execute(Guid targetInstanceId)<br/>         {<br/>             // your code goes here<br/>             base.Execute(targetInstanceId);<br/> <br/> <br/>             string webUrl = SPContext.Current.Web.Url;<br/>             using (SPSite site = new SPSite(webUrl))<br/>             using (SPWeb web = site.OpenWeb())<br/>             {<br/> <br/>                <br/>                 SPList list = web.Lists[&quot;MHN&quot;];<br/>                 SPGroup objgroup = web.SiteGroups[&quot;AlertEmail&quot;];<br/>                 SPUserCollection userCollection = objgroup.Users;<br/>                <br/>                 string strQuery1 = &quot;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Modified'/&gt;&lt;Value Type='DateTime'&gt;&lt;Today /&gt;&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&quot;;<br/>                 <br/>                 string subject = string.Format(&quot;Item has been added/updated in MHN Document Library&quot;, list.Title);<br/>                 string body = null;<br/>                 string strmsg = &quot;These items have been Added or Modified today&quot;;<br/>                 string strmodifiedby = &quot;&quot;;<br/>                 string strDTN = &quot;&quot;;<br/>                 <br/>                 SPQuery objquery = new SPQuery();<br/>                 objquery.Query = strQuery1;<br/>                 int itemID = 0;<br/>                <br/>                 StringBuilder sb = new System.Text.StringBuilder();<br/> <br/> <br/>                 sb.Append(&quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&quot;);<br/>                 sb.Append(&quot;&lt;br&gt;Dear Sir/Maa'm,&lt;br/&gt;&quot;);<br/>                 sb.Append(&quot;&lt;li&gt;&lt;/li&gt;&quot;);<br/>                 sb.Append(&quot;&lt;p&gt;&lt;strong&gt;&quot; + strmsg + &quot;&lt;/strong&gt;&lt;/p&gt;&quot;);<br/>                 sb.Append(&quot;&lt;table cellpadding=\&quot;0\&quot; cellspacing=\&quot;0\&quot; border=\&quot;2\&quot; border-color=\&quot;white\&quot;&gt;&quot;);<br/> <br/>                 sb.Append(&quot;&lt;tr&gt;&quot;);<br/>                 sb.Append(&quot;&lt;td&gt;Document Link&lt;/td&gt;&quot;);<br/>                 sb.Append(&quot;&lt;td&gt;Title&lt;/td&gt;&quot;); <br/>                 sb.Append(&quot;&lt;td&gt;DTN&lt;/td&gt;&quot;);<br/>                 sb.Append(&quot;&lt;/tr&gt;&quot;);<br/>                <br/>        #region abs<br/> <br/>                 SPListItemCollection objListColl = list.GetItems(objquery);<br/> <br/>                 if (objListColl.Count != 0) //send mail<br/>                 {<br/>                     foreach (SPListItem item in objListColl)<br/>                     {<br/>                         itemID = item.ID;<br/> <br/>                         //string subject = string.Format(&quot;Item '{0}' added/updated to '{1}'&quot;, item.Name, list.Title);<br/>                         //string body = null;<br/>                         string itemUrl = string.Format(&quot;{0}/{1}?ID={2}&quot;, web.Url, list.Forms[PAGETYPE.PAGE_DISPLAYFORM].Url, itemID);<br/> <br/>                         if (item[&quot;Title&quot;] == null)<br/>                         {<br/>                             strTitle = item.Name;<br/>                         }<br/>                         else<br/>                         {<br/>                             strTitle = item[&quot;Title&quot;].ToString();<br/>                         }<br/> <br/>                         string[] strmodified;<br/>                         if (item[&quot;Modified By&quot;] == null)<br/>                         {<br/>                             strmodifiedby = DateTime.Now.ToString();<br/>                             strmodified = strmodifiedby.Split('#');<br/>                         }<br/>                         else<br/>                         {<br/>                             strmodifiedby = item[&quot;Modified By&quot;].ToString();<br/>                             strmodified = strmodifiedby.Split('#');<br/>                         }<br/> <br/>                         if (item[&quot;DTN&quot;] == null)<br/>                         {<br/>                             strDTN = &quot;NA&quot;;<br/>                         }<br/>                         else<br/>                         {<br/>                             strDTN = item[&quot;DTN&quot;].ToString();<br/>                         }<br/> <br/>                        <br/> <br/>                 #endregion<br/>                         //sb.Append(&quot;&lt;tr&gt;&quot;);<br/> <br/>                         sb.Append(&quot;&lt;tr&gt;&quot;);<br/>                         sb.Append(&quot;&lt;td&gt;&lt;a href='&quot; + itemUrl + &quot;'&gt;&quot; + item.Name + &quot;&lt;/a&gt;&lt;/td&gt;&quot;);<br/>                         sb.Append(&quot;&lt;td&gt;&quot; + strTitle + &quot;&lt;/td&gt;&quot;);<br/>                         sb.Append(&quot;&lt;td&gt;&quot; + strDTN + &quot;&lt;/td&gt;&quot;);<br/>                         sb.Append(&quot;&lt;/tr&gt;&quot;);<br/>                         <br/>                     }<br/>                         sb.Append(&quot;&lt;/table&gt;&quot;);<br/>                         sb.Append(&quot;&lt;/body&gt;&lt;/html&gt;&quot;);<br/> <br/>                         body = sb.ToString();<br/>                        <br/>                     <br/>                     foreach (SPUser user in userCollection)<br/>                     {<br/>                         if (string.IsNullOrEmpty(user.Email)) continue;<br/>                         SPUtility.SendEmail(web, true, false, user.Email, subject, body);<br/>                     }<br/>                 }<br/>                 else<br/>                 {<br/>                     Console.WriteLine(&quot;Email does not exist&quot;);<br/>                     Console.ReadLine();<br/>                 }<br/>             }<br/>         }<hr class="sig">HemendraWed, 25 Nov 2009 07:24:27 Z2009-11-26T04:19:07Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e751e9e9-8b3d-4db9-865a-e064e7f3ca79http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e751e9e9-8b3d-4db9-865a-e064e7f3ca79spazmospazmohttp://social.technet.microsoft.com/Profile/en-US/?user=spazmospazmoASP.NET includes on a sharepoint site?Hello!<br/><br/>I'm building a few simple .aspx pages on a WSS 3.0 site, and my page includes don't seem to be working.<br/><br/>My code is:<br/><br/>&lt;p&gt;&lt;!--#include file=&quot;footer.inc&quot;--&gt;&lt;/p&gt;<br/><br/>which shows up as grayed out and the included file doesn't appear on the page. I tried putting the absolute path in there as well and it didn't work.<br/><br/>I've also changed my footer.inc from a full html page (with &lt;html&gt; and &lt;body&gt; tags) to just a simple bit of text and it still won't work.<br/><br/>Is there a trick to creating the .inc file? I'm coming from a php world so perhaps I'm aproaching this with some residual framework in mind that's causing problems.<br/><br/>More information: I'm creating a footer file that I want to appear in all my .aspx pages. So it's just a simple footer.<br/><br/>Any advice is appreciated! Thanks!<br/><br/>-Spaz<br/><br/><br/><br/><br/><br/>Wed, 25 Nov 2009 21:02:21 Z2009-11-26T04:13:53Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/804bea59-4264-49ff-be87-b244750cf07bhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/804bea59-4264-49ff-be87-b244750cf07bsusanthihttp://social.technet.microsoft.com/Profile/en-US/?user=susanthiAdding list items to a folder with in the listHai,<br/>          i have a list with some 10 to 20 folders. i need to add list items programatically to one of those folders based on logged in user. anyone can help me please......Tue, 24 Nov 2009 12:10:09 Z2009-11-26T03:26:40Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5e7ee8ea-5e61-44fe-a03d-3166a2f3421bhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5e7ee8ea-5e61-44fe-a03d-3166a2f3421bItsMeSrihttp://social.technet.microsoft.com/Profile/en-US/?user=ItsMeSrihow to find Person.aspx page using SpLimitedWebPartManager?I am trying to find Person.aspx using SpLimitedWebPartManager like this<br/> <br/>    // Get the web part collection<br/>                 SPLimitedWebPartManager collPerson =<br/>                     site.GetLimitedWebPartManager(&quot;Person.aspx&quot;,<br/>                     PersonalizationScope.Shared);<br/> <br/> here I am getting error like below<br/> <br/> The file http://sptest:11002/personal/administrator/Person.aspx does not exist.<br/><hr class="sig">JamsbondTue, 24 Nov 2009 20:09:24 Z2009-11-26T02:50:51Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/f3c0af19-edf0-4052-8d5d-f211efee54fchttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/f3c0af19-edf0-4052-8d5d-f211efee54fcallan8964http://social.technet.microsoft.com/Profile/en-US/?user=allan8964how to develop web parts for weather, news, etc?hi there,<br/><br/>i know it's a big topic, just want some helpful links or blogs to get some ideas how to develop the web parts used as gadgets on a page to get info of weather, news or even stock or sports events. thanks in advance.<br/><hr class="sig">allanTue, 24 Nov 2009 22:30:09 Z2009-11-26T02:48:09Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/631e6831-4572-457d-8260-932a18de20e5http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/631e6831-4572-457d-8260-932a18de20e5BiztalkGhosthttp://social.technet.microsoft.com/Profile/en-US/?user=BiztalkGhostWSP DeploymentHi,<br/><br/>I have a .WSP file. I need to how to deploy this in moss. I tried with stsadm but not getting it . Please let me know the steps i need to follow<hr class="sig">Vijaykishan | http://v2attechhorizon.blogspot.com | Please mark this as answer if it helpsWed, 25 Nov 2009 09:51:37 Z2009-11-26T02:42:13Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/85cd2935-78d6-4e54-8fa6-8e7bbc2c0fb7http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/85cd2935-78d6-4e54-8fa6-8e7bbc2c0fb7Matt Starkhttp://social.technet.microsoft.com/Profile/en-US/?user=Matt%20StarkChanging Folder Icon Based On ContentType (Or Merely How To Add Additional Icon)I'm fairly new to SharePoint and am curious how I change the Folder.gif icon into a different icon based on the folders content type.<br/> <br/> I looked in Docicons.xml, seems like it's only for document icons by extension.  I've tried in vain to add the DocIcon Field to my custom content type and putting an icon in there.  Seems like an option would be to make the folder look like a file and therefore pull the icon out of docicons.xml (but not sure what other adverse affects I'd see).  None of these solutions worked for me.  I'd use JavaScript but can't determine the content types from the front end without building some asynchronous call to query the server code (don't like that approach but may be only option right now).<br/> <br/> I've gone as far as searching the 12 hive for instances of folder.gif - have found it in many places and am now trying to figure out how the puzzle goes back together.<br/> <br/> I'm assuming I need to modify something in either ONET.xml or Fieldswss.xml - but really have no idea even where the info is in the XML that would be parsed (is this XML merely the List xml?).<br/> <br/> Any help would be greatly appreciate.  I understand there are a variety of issues with using folders but our client mandated it and that is that...<br/> <br/> <br/> <br/>Thu, 01 Oct 2009 18:20:42 Z2009-11-26T02:42:02Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/535e8c1a-10e2-420f-957d-bb89533f1aaehttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/535e8c1a-10e2-420f-957d-bb89533f1aaeBeaSharepointhttp://social.technet.microsoft.com/Profile/en-US/?user=BeaSharepointerror with sharepoint when using VS 2008Hello!<br/><br/>I'm using visual studio 2008, i'm using code for sharepoint, when i try it to compile it show me this errorr:<br/><br/>the type or namespace name 'Sharepoint' does not exist in the namespace 'Microsoft'<br/><br/>i'm using <span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"> <p>using</p> </span></span></span><span style="color:#0000ff;font-size:x-small"> <p> </p> </span></span> <p><span style="font-size:x-small">Microsoft.Sharepoint; but i don't found the dll in my pc<br/><br/>someone knows waht it is happening?<br/><br/>thank<br/><br/></span></p>Wed, 25 Nov 2009 09:15:04 Z2009-11-26T02:36:00Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d77ea62e-e17a-41dd-bde8-e9e2fd4a6803http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d77ea62e-e17a-41dd-bde8-e9e2fd4a6803Bhavesh A Patelhttp://social.technet.microsoft.com/Profile/en-US/?user=Bhavesh%20A%20PatelStore uploaded files on a shared drive as opposed to directly in the database? Hi Guys,<br/><br/>Generally uploaded files in sharepoint are stored in content database but can we store it on shared drive and use and serch it in sharepoint ?<br/><br/><br/><br/>ThanksWed, 25 Nov 2009 11:21:26 Z2009-11-26T02:33:22Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/558e135b-d491-4466-9085-3981a903f3e5http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/558e135b-d491-4466-9085-3981a903f3e5aaroh_bitshttp://social.technet.microsoft.com/Profile/en-US/?user=aaroh_bitsProblem getting permission for the user from the TASK list. Hi All, <br/> <br/> I have a <strong>document library</strong> (namely, Business Services), its attached to <strong>OOTB Approval workflow</strong> and workflow is attached to the TASK list. <br/> Apparently, I wrote a an event handler (<strong>ItemUpdating</strong> ) because &quot;contributor&quot; can approve his own document. So, we have modified the behavior of OOTB Approval workflow. Its seems &quot;by design&quot;.   Please <a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/01947d74-db79-4e79-897f-d21a9e00c313">see this link </a> about OOTB Approval workflow issue. <br/> <br/> We have 2 users: <br/> 1) <strong>vm1/contributor</strong> (with <strong>contribute</strong> permission on &quot;<strong>Business Services</strong> &quot; document library)<br/> 2) vm1/approver (with <strong>approve</strong> permission on &quot;<strong>Business Services</strong> &quot; document library)<br/> <br/> This is my event handler: <br/> <br/> The event handler is hooked to the &quot;TASK&quot; list and I am able to get the <strong>&quot;vm1/contributor&quot; </strong> as well. <br/> But I need to get the permission of the user (<strong>vm1/contributor</strong> ) who is from &quot;Business services&quot; lists. <br/> <br/> Can somebody advice me on this? <br/> <br/> Thank you. <br/> --Aroh <br/> <pre lang="x-c#"> public override void ItemUpdating(SPItemEventProperties properties) { base.ItemUpdating(properties); this.DisableEventFiring(); using (SPWeb currentTeamSite = properties.OpenWeb()) { // Delcare variables string currentUser = string.Empty; // Get the current item SPListItem currentItem = properties.ListItem; Console.WriteLine(&quot;Parent list {0}&quot;, currentItem.ParentList); // ITS TASK LIST // Get the value display name of the current logged in user and Created by Field of the current item currentUser = currentItem[&quot;Author&quot;].ToString(); // USER FROM &quot;BUSINESS SERVICES&quot; // Get the user id as integer int userid = Convert.ToInt32(currentUser.Substring(0, currentUser.IndexOf(&quot;;#&quot;))); // Convert SharePoint user which matches the ID SPUser user = currentTeamSite.AllUsers.GetByID(userid); // Now, we have to user's permissions (Document Library, not on the Task) ???????????? } this.EnableEventFiring(); }</pre> <br/>Wed, 25 Nov 2009 09:28:25 Z2009-11-26T02:32:21Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/bd941d57-80f4-4274-81e8-54c44d52ce87http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/bd941d57-80f4-4274-81e8-54c44d52ce87OttawaTechGuyhttp://social.technet.microsoft.com/Profile/en-US/?user=OttawaTechGuySending email from SharePointHello:<br/> <br/> I am using SPUtility.SendEmail to send an email via SharePoint customized webpart. The code is working on our development server (Which is a standalone sharepoint server).<br/> <br/> In our production envrionment we have two WFE and two QRY and one IDX server, which are protected by firewall. I have configured the Outgoing mail setup on central admin with appropriate SMTP server. But I can not send the email via SPUtility.SendEmail. I also tried system.net.mail but the same code is working on our dev but not on our production.<br/> <br/> I need to know that do I have to configure something else then 'Outgoing email settings' ? <br/> I can see from FireWall that WFE requests are being forwarded to correct SMTP server on port 25.<br/> <br/> Any help is appreciated<br/> <br/> Thanks<hr class="sig">SharePoint DeveloperWed, 25 Nov 2009 22:32:47 Z2009-11-26T02:24:09Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1ed217b1-9441-4fe1-b3aa-68b2768bdfc7http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1ed217b1-9441-4fe1-b3aa-68b2768bdfc7Victor Palmahttp://social.technet.microsoft.com/Profile/en-US/?user=Victor%20PalmaUpdating list item value on the ItemAdding event handler of an Item Receiver classI got an Event Handler Receiver class attached to a content type (custom list) within a site. On my ItemAdding event handler, I am trying to change the value of a field and update it with another value. I keep on getting a Null reference error on the actual value of the AfterProperties or ListItem value. This is my event handler method:<br><br><br><div style="overflow:auto;background-color:white;line-height:100% ! important;font-family:Courier New;font-size:11px"><table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;background-color:rgb(255, 255, 255)" cellpadding=0 cellspacing=0><col style="font-family:Courier New;font-size:11px;padding-left:10px;white-space:nowrap"><tbody><tr><td><font style="font-size:11px">        </font><font style="color:blue">public</font><font style="font-size:11px"> </font><font style="color:blue">override</font><font style="font-size:11px"> </font><font style="color:blue">void</font><font style="font-size:11px"> ItemAdding(SPItemEventProperties properties) </font></td></tr><tr><td style="background-color:rgb(247, 247, 247)">        { </td></tr><tr><td>            <font style="color:blue">using</font><font style="font-size:11px"> (SPWeb web = properties.OpenWeb()) </font></td></tr><tr><td style="background-color:rgb(247, 247, 247)">            { </td></tr><tr><td>                DisableEventFiring(); </td></tr><tr><td style="background-color:rgb(247, 247, 247)">                <font style="color:blue">string</font><font style="font-size:11px"> workordercreated = properties.AfterProperties[</font><font style="color:blue">&quot;Work Order Created&quot;</font><font style="font-size:11px">].ToString(); </font></td></tr><tr><td>                <font style="color:blue">if</font><font style="font-size:11px"> (workordercreated == </font><font style="color:blue">&quot;No&quot;</font><font style="font-size:11px">) </font></td></tr><tr><td style="background-color:rgb(247, 247, 247)">                { </td></tr><tr><td>                    properties.ListItem[<font style="color:blue">&quot;Work Order Created&quot;</font><font style="font-size:11px">] = </font><font style="color:blue">&quot;Yes&quot;</font><font style="font-size:11px">; </font></td></tr><tr><td style="background-color:rgb(247, 247, 247)">                    properties.ListItem.Update(); </td></tr><tr><td>                } </td></tr><tr><td style="background-color:rgb(247, 247, 247)">                EnableEventFiring(); </td></tr><tr><td>            } </td></tr><tr><td style="background-color:rgb(247, 247, 247)">        } </td></tr><tr><td> </td></tr></tbody></table></div><br>I cannot get a value of this line:<br><br><b>                string workordercreated = properties.AfterProperties[&quot;Work Order Created&quot;].ToString();<br></b><br>or using<br><br><b>                string workordercreated = properties.ListItem[&quot;Work Order Created&quot;].ToString();<br></b><br>any ideas?<br><br><br> <hr class="sig">Victor PalmaThu, 05 Feb 2009 23:50:17 Z2009-11-26T02:06:06Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/88132218-f063-40a0-92f9-68f6d14beecahttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/88132218-f063-40a0-92f9-68f6d14beeca.NET CONFUSEDhttp://social.technet.microsoft.com/Profile/en-US/?user=.NET%20CONFUSEDCustom webparts that look professional OOTB which has sort header and other reference links<p>Custom webpart which has sort header and other reference links</p> <p>Hi the normal OOTB standard webparts to look at listitems look nice ie have nice header , the ability to sort from the headers. I want to incorporate this in my custom webpart based on custom list and also want the following</p> <p>1. For a list item there is a workflow progress field , I want a hyperlink for the particular listitem. I see it points to wrkStat.aspx but how do i get the rest of the querystring has it says List=??????&amp;WorkflowInstanceId=?????</p> <p>2. For a list item I am reading it has the username column, it has a hyperlink userdisp.aspx?id=?????? , how do i get the ID of the person based on a user column.</p> <p>3. I want a webpart which automatically refreshes say every 5mins</p>Tue, 24 Nov 2009 21:00:22 Z2009-11-26T02:03:35Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d80db48c-23c9-4214-ba18-06b4cd8943b8http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d80db48c-23c9-4214-ba18-06b4cd8943b8hemantrhtkhttp://social.technet.microsoft.com/Profile/en-US/?user=hemantrhtkquery on datagrid Hi<br/> <br/> I want to query a datagrid on the page. possibly using Linq. <br/> <br/> My purpose is to extract data of a column into an IList:-<br/> currently doing like:-<br/> for each(raddatagrid item in radgrid.items)<br/> {<br/> lst.add(item[&quot;uniquecolumnname&quot;].text);<br/> }<br/> <br/> but Due to performance concerns, I want to use Linq directly to populate &quot;uniquecolumnname&quot; string  values to another Ilist&lt;string&gt;.<br/> <br/> please suggest how to query a datagrid item collection directly.<br/> <br/> <br/> Cheers-Hemant<br/> +919555798309<br/> hemantup@gmail.com<br/> <br/>Tue, 24 Nov 2009 06:43:33 Z2009-11-26T01:55:06Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/a65c25cc-c7cd-44d2-b5e5-5b17dfa59c13http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/a65c25cc-c7cd-44d2-b5e5-5b17dfa59c13Mitja Kravoshttp://social.technet.microsoft.com/Profile/en-US/?user=Mitja%20KravosCreate Shared Service Provider programmaticallyHi,<br/> <br/> I would like to know if there is a way to create SSP programmatically?<br/> <br/> Br, MitjaTue, 24 Nov 2009 08:46:55 Z2009-11-26T01:49:36Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/75d0264a-876a-49b2-932f-c7c9d8a50c1dhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/75d0264a-876a-49b2-932f-c7c9d8a50c1dadobepankajhttp://social.technet.microsoft.com/Profile/en-US/?user=adobepankajReference dll for Microsoft.fprpcHi,<br/>    When I was looking for Fprpc on msdn, I came across Microsoft.Fprpc class. I wanted to know how this class is different from the FPRPC calls provided using the http POST method. Where is class is used, if someone can provide any application name/code which is using this class.<br/><br/>Also I could not find the reference to <span class=Apple-style-span style="word-spacing:0px;font:medium 'Times New Roman';text-transform:none;color:#000000;text-indent:0px;white-space:normal;letter-spacing:normal;border-collapse:separate"><span class=Apple-style-span style="font-size:11px;font-family:Verdana, Arial, Helvetica, sans-serif">microsoft.office.excel.server.addins.computecluster.dll. I could not find this file even after the full installation of VS2008. Please tell me where can I get this from.<br/></span></span><br/>Thanks and Regards Tue, 24 Nov 2009 09:19:42 Z2009-11-26T01:44:28Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5fccef29-1037-490c-b115-99a260182eb7http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5fccef29-1037-490c-b115-99a260182eb7Pall olafshttp://social.technet.microsoft.com/Profile/en-US/?user=Pall%20olafsItemCheckedIn event called twice?Hi, I have an event handler on my document library that is called twice when a document is checked in or uploaded.<br/> <br/> Why is this event handler called twice?  I have a problem because Im triggering an workflow when someone checks in a document and at this point the workflow will be triggered twice...<br/> <br/> here is my code:<br/> <br/>  SPWorkflowManager wfmanager = properties.ListItem.ParentList.ParentWeb.Site.WorkflowManager;<br/>                      SPWorkflowAssociation wf = properties.ListItem.ParentList.WorkflowAssociations.GetAssociationByName(WorkflowName, System.Globalization.CultureInfo.CurrentCulture);<br/> <br/>                      if (wf != null)<br/>                      {<br/>                         bool isCurrentlyRunning = false;<br/>                         SPWorkflowCollection wfRunningCollection = wfmanager.GetItemActiveWorkflows(properties.ListItem);<br/> <br/>                         foreach (SPWorkflow runningWorkflow in wfRunningCollection)<br/>                         {<br/>                            if (runningWorkflow.ParentAssociation.BaseId == wf.BaseId)<br/>                            {<br/>                               isCurrentlyRunning = true;<br/>                            }<br/>                         }<br/> <br/>                         try<br/>                         {<br/>                            if (!isCurrentlyRunning)<br/>                            {<br/>                               <br/>                               wfmanager.StartWorkflow(properties.ListItem, wf, wf.AssociationData, true);<br/>                            }<br/>                         }<br/>                         catch (Exception ex)<br/>                         {<br/>                            properties.Cancel = true;<br/>                            properties.ErrorMessage = &quot;Failed to start approval workflow. &quot;;<br/>                            SPSecurity.RunWithElevatedPrivileges(delegate { EventLog.WriteEntry(&quot;Knowledge works event handler&quot;, string.Concat(new object[] { &quot;Exception in Function: &quot;, ex.Message, &quot; Inner Excpetion: &quot;, ex.InnerException, &quot;Call Stack: &quot;, ex.StackTrace }), EventLogEntryType.Error); });<br/>                         }<br/>                      }<br/>                         <br/>                      <br/>                   }Tue, 24 Nov 2009 10:04:11 Z2009-11-26T02:02:33Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d29af7f6-149c-42cc-8140-ef960c0aeb72http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/d29af7f6-149c-42cc-8140-ef960c0aeb72.NET CONFUSEDhttp://social.technet.microsoft.com/Profile/en-US/?user=.NET%20CONFUSEDstandards in ammending out of the box js files which is in the layouts folder<p>The way to handle .js files in laouts folder</p> <p>OK the scenerio is I have to put some JavaScript on form.js as I need to put some extra code to validate sharepoint fields , therefore ammended PreSaveItem()<br/>I wish to point out there is also preSaveAction() which you can put on customized newform.aspx or editform.aspx but I cannot customize these forms therefore I am to use the standard newform.aspx,editform.aspx</p> <p>My concerns is (thinking out loud) I should put my code in a custom.js and have an override method therefore I am not ammending Form.js.</p> <p>Is this right and how do i plan for this and how do i do an override on a standard method ?</p>Tue, 24 Nov 2009 16:07:47 Z2009-11-26T01:12:54Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e8fdc1e8-0bdf-4101-97b5-4dc2fa5bd621http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e8fdc1e8-0bdf-4101-97b5-4dc2fa5bd621ItsMeSrihttp://social.technet.microsoft.com/Profile/en-US/?user=ItsMeSriHow to retrive Listviewwebpart from the page?I dropped a ListViewWebPart in on the &quot;Default_xxx.aspx&quot; page. <br/> <br/> <pre lang=x-aspx>&lt;WebPartPages:ListViewWebPart runat=&quot;server&quot; ID=&quot;oListViewConferences&quot; Title=&quot;Conferences Attended&quot; ChromeType=&quot;None&quot; WebPart=&quot;true&quot; __MarkupType=&quot;vsattributemarkup&quot; __WebPartId=&quot;{95A510E3-DC4E-440f-B98B-018D9ADFDE67}&quot; __designer:IsClosed=&quot;false&quot; partorder=&quot;1&quot; &gt;&lt;/WebPartPages:ListViewWebPart&gt;</pre> Now I need this webpart when I am activating a feature. How can I retrive this Listviewwebpart ID in Feature activated method?<br/> <br/> <br/> <br/> <br/> <br/><hr class="sig">JamsbondTue, 24 Nov 2009 16:23:30 Z2009-11-26T01:08:54Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/bdffd1e2-9288-4a4b-8b1a-7d20da01dc95http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/bdffd1e2-9288-4a4b-8b1a-7d20da01dc95TLin100http://social.technet.microsoft.com/Profile/en-US/?user=TLin100Error seen after adding customized web part to web part zone.I have created a simple data capture web part consisting of three text boxes.  This has been done using Visual Studio 2008. I have created a corresponding list in my SharePoint site with three identically named columns.<br/><br/>I can build and deploy my web part successfully using Visual Studio 2008.  However, when I try to import the web part into my site for testing purposes, I see an error: &quot;Error rendering control - Control Name.   An unhandled exception has occurred.  Object reference not set to an instance of an object.&quot;<br/><br/>I have tried everything I can to try and resolve this. Can anyone help? Tue, 24 Nov 2009 12:27:49 Z2009-11-26T01:08:42Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/cbae5193-2159-4b20-b585-b8a804c902a9http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/cbae5193-2159-4b20-b585-b8a804c902a9ItsMeSrihttp://social.technet.microsoft.com/Profile/en-US/?user=ItsMeSriCreate Career Summary webpart?I need to create a a Career Summary webpart on the default.aspx page for user entry?<br/> <br/> <br/> <br/> <a href="http://s700.photobucket.com/albums/ww5/vsrikanth/?action=view&amp;current=careersummary.jpg"><img src="http://i700.photobucket.com/albums/ww5/vsrikanth/careersummary.jpg" border=0 alt=Photobucket> </a> <br/> <br/> <br/> When user clicks on Edit button. User need to navigate to new page. That page needs to have richtextbox  and save button.save details will need to come on web part again.<br/> <br/> How can create this type webpart? Is there any developed webpart available like this?<a href="http://s700.photobucket.com/albums/ww5/vsrikanth/?action=view&amp;current=careersummary.jpg"> </a><hr class="sig">JamsbondTue, 24 Nov 2009 20:55:53 Z2009-11-26T01:04:56Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/21a07022-9207-48b0-b075-aef79426278dhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/21a07022-9207-48b0-b075-aef79426278dJeff Law - JSLhttp://social.technet.microsoft.com/Profile/en-US/?user=Jeff%20Law%20-%20JSLAny way to bind a lists choice field to a dropdownlist for editing in SPGridView?I am hoping that this is a simple question to answer.<br/><br/>I have a list which contains a choice field with 4 options in it. I have a web part with a SPGridView of this list. At the moment I have this configured so that I can edit date and text fields, but I would also like to be able to change the choice field using a dropdownlist control.<br/><br/>I presume that my ascx file changes to something like:<br/><br/> <pre lang=x-html>&lt;ItemTemplate&gt;&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblRMRecordStatus&quot; Text='&lt;%#Bind (&quot;RMRecordStatus&quot;) %&gt;' /&gt;&lt;/ItemTemplate&gt; &lt;EditItemTemplate&gt;&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlRecordStatus&quot; Text='&lt;%#Bind (&quot;RMRecordStatus&quot;) %&gt;' /&gt;&lt;/EditItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&quot;Expiry Date&quot; &gt; &lt;ItemTemplate&gt;&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblRMExpiryDate&quot; Text='&lt;%#Bind (&quot;RMExpiryDate&quot;, &quot;{0:d}&quot;) %&gt;' /&gt;&lt;/ItemTemplate&gt; &lt;EditItemTemplate&gt;&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;txtExpiryDate&quot; Text='&lt;%#Bind (&quot;RMExpiryDate&quot;, &quot;{0:d}&quot;) %&gt;' /&gt;&lt;/EditItemTemplate&gt; &lt;/asp:TemplateField&gt; </pre> <br/> <div style="background-color:white;color:black"></div> Where RMRecordStatus is the name of the Choice Field that I want to use. With this configuration, I get the current setting displayed when viewing, but when I click on edit I get an empty drop down list.<br/><br/>If the options available are, say Option1, Option2, Option3 and Option4, and the current value in the item is Option2, then I would like Option2 to be selected, and all the options available in the dropdownlits. - Just like when editing the item &quot;normally&quot; :-)<br/><br/>Most things I have found link the dropdownlist to another list, or a SQL database...<br/><br/>Regards<br/>JeffThu, 19 Nov 2009 08:32:25 Z2009-11-26T00:57:28Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/f5556de2-6df0-41ce-9118-ab13a6e174aehttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/f5556de2-6df0-41ce-9118-ab13a6e174aerun4ithttp://social.technet.microsoft.com/Profile/en-US/?user=run4itIs there a way to use the layout from default.aspx in new webpart pages?I've made some new custom pages in my site.  However, I want the top title area and breadcrumbs to look like they do on the default.aspx page.  Is there some easy way to do this  or do I need to create a custom.master page that I can apply to these pages?Wed, 25 Nov 2009 21:25:39 Z2009-11-26T00:53:20Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/12edf082-ba7f-4063-8808-58aac6347682http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/12edf082-ba7f-4063-8808-58aac6347682PSealehttp://social.technet.microsoft.com/Profile/en-US/?user=PSealeDeploy solution to a Web Application scope?<p align=left><font face=Arial size=2>Hello, I'm having some trouble installing a solution package into a specific web application only. Specifically, the solution has exactly one Feature, which is set to a WebApplication scope in the feature.xml file.</font></p> <p align=left> </p> <p align=left><strong>I've already successfully installed this solution globally</strong> but I would like to get this installed <strong>only on one web application</strong>.</p> <p align=left> </p> <p align=left>There's very little XML involved, so I'll post the actual files below (anonymized portions are <font color="#993366">highlighted purple</font>):</p> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left><strong>Feature.xml </strong>(my feature)</p><font color="#0000ff"><span class=m>&lt;?</span><span class=pi>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; </span><span class=m>?&gt;</span></font> <div class=e> <div style="margin-left:1em;text-indent:-2em"><span class=b><strong><font face="Courier New" color="#ff0000"> </font></strong></span> <span class=m><font color="#0000ff">&lt;</font></span><span class=t><font color="#990000">Feature</font></span> <span class=ns><font color="#ff0000">xmlns</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b class=ns><font color="#ff0000">http://schemas.microsoft.com/sharepoint/</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> Title</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b><font color="#993366">[[featuretitle]]</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> Description</font></span><span class=m><font color="#0000ff">=&quot;</font><font color="#993366"><strong>[[featuredescription]]</strong></font></span><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> Id</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b>{<font color="#993366">[[guid]]</font>}</b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> Scope</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b>WebApplication</b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> ReceiverAssembly</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b><font color="#993366">[[assemblyname]]</font>, Version=0.0.0.0, Culture=neutral, PublicKeyToken=<font color="#993366">[[publickeytoken]]</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> ReceiverClass</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b><font color="#993366">[[receiverclass]]</font></b><font color="#0000ff"><span class=m>&quot;</span><span class=m> /&gt;</span></font> </div></div> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left><strong>manifest.xml </strong>(my solution - generated by WSPBuilder but I'll take the blame if something's wrong <img alt=Smile src="http://forums.microsoft.com/MSDN/emoticons/emotion-1.gif"> )</p> <p align=left><font color="#0000ff"><span class=m>&lt;?</span><span class=pi>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; </span><span class=m>?&gt;</span></font> </p> <div class=k><span><a class=b style="visibility:hidden"><strong><font face="Courier New" color="#ff0000">-</font></strong></a> <span class=m><font color="#0000ff">&lt;!--</font></span></span> <span class=ci id=clean><pre><font color="#888888" size=3> Solution created by WSPBuilder. 10/16/2007 10:17:06 AM </font></pre></span><span class=b><strong><font face="Courier New" color="#ff0000"> </font></strong></span> <font color="#0000ff"><span class=m>--&gt;</span> </font></div> <div class=e> <div class=c style="margin-left:1em;text-indent:-2em"><a class=b><strong><font face="Courier New" color="#ff0000">-</font></strong></a> <span class=m><font color="#0000ff">&lt;</font></span><span class=t><font color="#990000">Solution</font></span><span class=ns><font color="#ff0000"> xmlns:xsi</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b class=ns><font color="#ff0000">http://www.w3.org/2001/XMLSchema-instance</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=ns><font color="#ff0000"> xmlns:xsd</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b class=ns><font color="#ff0000">http://www.w3.org/2001/XMLSchema</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=t><font color="#990000"> SolutionId</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b><font color="#993366">[[guid]]</font></b><span class=m><font color="#0000ff">&quot;</font></span><span class=ns><font color="#ff0000"> xmlns</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b class=ns><font color="#ff0000">http://schemas.microsoft.com/sharepoint/</font></b><font color="#0000ff"><span class=m>&quot;</span><span class=m>&gt;</span></font></div> <div> <div class=e> <div class=c style="margin-left:1em;text-indent:-2em"><a class=b><strong><font face="Courier New" color="#ff0000">-</font></strong></a> <span class=m><font color="#0000ff">&lt;</font></span><span class=t><font color="#990000">FeatureManifests</font></span><span class=m><font color="#0000ff">&gt;</font></span></div> <div> <div class=e> <div style="margin-left:1em;text-indent:-2em"><span class=b><strong><font face="Courier New" color="#ff0000"> </font></strong></span> <span class=m><font color="#0000ff">&lt;</font></span><span class=t><font color="#990000">FeatureManifest</font></span> <span class=t><font color="#990000">Location</font></span><span class=m><font color="#0000ff">=&quot;</font></span><b><font color="#993366">[[featurename]]</font>\feature.xml</b><font color="#0000ff"><span class=m>&quot;</span><span class=m> /&gt;</span></font> </div></div> <div><span class=b><strong><font face="Courier New" color="#ff0000"> </font></strong></span> <span class=m><font color="#0000ff">&lt;/</font></span><span class=t><font color="#990000">FeatureManifests</font></span><span class=m><font color="#0000ff">&gt;</font></span></div></div></div> <div><span class=b><strong><font face="Courier New" color="#ff0000"> </font></strong></span> <span class=m><font color="#0000ff">&lt;/</font></span><span class=t><font color="#990000">Solution</font></span><span class=m><font color="#0000ff">&gt;</font></span></div></div></div> <p> </p> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left><strong>stsadm commands I've been using to add/deploy this:</strong></p> <p align=left> </p> <p align=left>stsadm -o addsolution -filename <font color="#800080">[[solutionfilename]]</font></p> <p align=left>stsadm -o execadmsvcjobs</p> <p align=left>stsadm -o deploysolution -name <font color="#800080">[[solutionfilename]]</font> -url <a title="http://test404/" href="http://test404/">http://test404/</a> -immediate<br></p> <p> </p> <p align=left><strong>Specific error message I receive when running the stsadm -o deploysolution command:</strong></p> <p align=left>This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.</p>Tue, 16 Oct 2007 18:14:38 Z2009-11-26T00:38:22Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/925f0508-c2d8-47f9-91c2-7c655a2040f1http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/925f0508-c2d8-47f9-91c2-7c655a2040f1Diana.Manowhttp://social.technet.microsoft.com/Profile/en-US/?user=Diana.ManowSpecific web.config -> Configuration object?<p>Inside a web application feature I try to get a Configuration object of the web.config file.</p> <p>I tried this:</p> <p><strong>config = WebConfigurationManager.OpenWebConfiguration(&quot;/&quot;, webApp.Name);<br/>config = WebConfigurationManager.OpenWebConfiguration(&quot;/15678&quot;, webApp.Name);</strong><br/><br/>=&gt; Exception:<br/>Failed to resolve the site ID for 'MyWebApplicationName'.  <br/><br/>('MyWebApplicationName' == webApp.Name).<br/><br/>Why does SharePoint want to resolve the site ID for 'MyWebApplicationName'?<br/><br/>My folder structure looks like this:</p> <p>C:\inetpub\wwwroot\wss\VirtualDirectories<br/>C:\inetpub\wwwroot\wss\VirtualDirectories\80<br/>C:\inetpub\wwwroot\wss\VirtualDirectories\15678</p> <p>and the wanted web.config is located in C:\inetpub\wwwroot\wss\VirtualDirectories\15678\web.config.</p> <p><br/>I've had a look at the msdn docs (<a href="http://msdn.microsoft.com/en-us/library/ms151456.aspx">http://msdn.microsoft.com/en-us/library/ms151456.aspx</a>) and a comment in this post <a href="http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx">http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx</a> but without any success.</p> <p><br/>How can I access key/value pairs in a specific web.config?</p>Mon, 23 Nov 2009 17:55:01 Z2009-11-26T00:34:47Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/fc2f342e-c536-47e5-970e-78190031f772http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/fc2f342e-c536-47e5-970e-78190031f772mInNaLhttp://social.technet.microsoft.com/Profile/en-US/?user=mInNaLSharePoint Custom Field Type & MultipleLookupFieldHi,<br/> <br/> I have made my &quot;CustomFieldType&quot; and got deployed and working fine. Except one thing.<br/> My &quot;FieldControl&quot; in New and Edit mode is not being shown as I wanted.<br/> <br/> ListBox is being shown fine, but my MultipleLookupField is not being shown at all. It doesn't even throws any exceptions.<br/> What am I doing wrong?<br/> <br/> <pre lang="x-c#">ListBox lb; MultipleLookupField mlf; protected override void CreateChildControls() { base.CreateChildControls(); NNLookupField field = (NNLookupField)Field; SPList list = SPContext.Current.Web.Lists.GetList(new Guid(field.ListID.ToString()), true); if (list != null &amp;&amp; list.Items.Count &gt; 0) { mlf = new MultipleLookupField(); mlf.ControlMode = SPControlMode.Edit; mlf.FieldName = &quot;Related&quot;; mlf.ItemId = list.Items[0].ID; mlf.ListId = list.ID; mlf.ID = &quot;Related&quot;; this.Controls.Add(mlf); lb = new ListBox(); foreach (SPListItem item in list.Items) { lb.Items.Add(new ListItem(item.Title, item.ID.ToString())); } this.Controls.Add(lb); } }</pre>Wed, 25 Nov 2009 17:29:43 Z2009-11-25T21:47:05Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b1ea1bd3-68e5-4811-ace9-05904c4e4a3fhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b1ea1bd3-68e5-4811-ace9-05904c4e4a3fJCNEThttp://social.technet.microsoft.com/Profile/en-US/?user=JCNETSPList return the List Row ID given the first occurance of a given column value?<p>This is just a test.. and I'm sure there is a much more elegant way to do this.. this code is failing nonetheless with this at the condition. Note I have two columns I'm working with.. the one I'm looking up and the Row ID I want back.<br/><br/><strong><span>An error occurred during the compilation of the requested file, or one of its dependencies. Cannot implicitly convert type 'object' to 'bool'. An explicit conversion exists (are you missing a cast?)</span> <br/></strong></p> <pre lang="x-c#">SPSite siteCollection = new SPSite(&quot;http://somesite&quot;); SPWeb web = siteCollection.OpenWeb(); SPList mylist = web.Lists[&quot;MyList&quot;]; SPField field = mylist.Fields[&quot;MyKey&quot;]; foreach(SPListItem spli in mylist.Items) { if (spli[field.Id] = 125) { Response.Write(&quot;want the ID of the row here&quot;); } } }</pre> <p>I've got two issues:<br/><br/>1. How do I cast that condition  so that I can compare to a numeric value? MyKey is numeric<br/>2. How do I return the ID of the Row<br/><br/>Thanks for any help or information!<br/></p>Tue, 24 Nov 2009 23:18:53 Z2009-11-25T21:12:31Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b04a91d4-af4d-44b7-9d9b-1d4e8a74e5d7http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b04a91d4-af4d-44b7-9d9b-1d4e8a74e5d7MossNovicehttp://social.technet.microsoft.com/Profile/en-US/?user=MossNoviceProgramatically creating a folder in sharepoint listAll,<br/><br/>I am trying to create a folder in a sharepoint list. I was able to add a folder in a document library but not in a sharepoint list. This is the code i tried. The commented one is for Document Library which worked but not for the list. Please advise.<br/><br/>Regards, <br/><br/><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small">//Cabinet Documents List<br/></span></span></p> <span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small"><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small">//SPDocumentLibrary CabinetDocuments = (SPDocumentLibrary)web.Lists[&quot;Test&quot;];<font size=2 color="#2b91af"><font size=2 color="#2b91af"><font size=2 color="#008000"><font size=2 color="#008000"> <p> </p> </font></font>SPList</font></font></span><font size=2 color="#2b91af"><font size=2 color="#2b91af"><font size=2 color="#008000"> <p> </p> </font>SPList</font></font></span></p> <font size=2 color="#2b91af"><font size=2 color="#2b91af"> <p>SPList</p> </font></font></span><font size=2 color="#2b91af"> <p> </p> </font></span> <p><span style="font-size:x-small"> CabinetDocuments = web.Lists[</span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;CabinetDocuments&quot;</span></span><span style="font-size:x-small">];<font size=2> <p> </p> </font></span></p> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">SPFolderCollection</span></span><span style="font-size:x-small"> Folder = web.Folders;<font size=2> <p>Folder.Add(</p> </font></span></p> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">SPContext</span></span><span style="font-size:x-small">.Current.Web.Url + </span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;/Lists/&quot;</span></span><span style="font-size:x-small"> + </span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;CabinetDocuments&quot;</span></span><span style="font-size:x-small"> + </span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;/&quot;</span></span><span style="font-size:x-small">);<font size=2> <p> </p> </font></span></p> <p><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small">//Folder.Add(&quot;http://moss-test:11111/sites/infotech/cpw/Test/&quot; + &quot;Folder&quot; +&quot;/&quot;);</span></span></p> <span style="font-size:x-small"> <p>CabinetDocuments.Update();</p> </span><br/>Wed, 25 Nov 2009 20:43:13 Z2009-11-25T21:03:33Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0fa928ba-db8c-4a77-b906-67944aa88253http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0fa928ba-db8c-4a77-b906-67944aa88253GillouXhttp://social.technet.microsoft.com/Profile/en-US/?user=GillouXKeep version history when moving a documentIn this article you can see that moving document through Site content and structure allows you not to loose the version history of the document.<br/> <br/> http://sphelpdesk.spaces.live.com/blog/cns!D9676F3678CF7BE7!173.entry?wa=wsignin1.0&amp;sa=336374930<br/> <br/> the thing is that I would like to implement this behavior through a custom actions.<br/> <br/> Can sy tell me what technique they are using to do that ? FP RPC, WebDav ? custom object model code which does not appear in the api ? <br/> <br/> thx in advanceWed, 25 Nov 2009 19:32:32 Z2009-11-25T20:45:24Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/421841cb-223b-462d-bbf5-d151c623d232http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/421841cb-223b-462d-bbf5-d151c623d232mossupialhttp://social.technet.microsoft.com/Profile/en-US/?user=mossupial"There are no page layout files available in the master page library of the top-level site..."<p align=left><font face=Arial size=2>I deployed a page layout via a feature to the Site Col. and I now receive this error upon trying to create a new page.</font></p> <p align=left> </p> <p>&quot;There are no page layout files available in the master page library of the top-level site. Add one or more page layouts to this library before you create a page or set page properties&quot;</p> <p align=left> </p> <p align=left>I verified that the feature is activated and the page layout (and the OOTB page layouts) are in the master page gallary.</p> <p align=left> </p> <p align=left>Has anyone seen this error?  I assume that there is a problem with my page layout.  But this error is fairly generic.</p> <p align=left> </p> <p align=left>Thanks</p> <p align=left> </p> <p align=left> </p>Mon, 12 Nov 2007 16:59:16 Z2009-11-25T20:33:59Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/4f8deb6d-4a27-4316-8a85-2b01f37256a2http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/4f8deb6d-4a27-4316-8a85-2b01f37256a2neddyflandershttp://social.technet.microsoft.com/Profile/en-US/?user=neddyflandersText Field to Item Level Security Event ReceiverI have a Text Field (Last Name, First Name) Like Smith, Harry. in my code I am having trouble getting it in the right format in my ItemAdded so I can give this person Contribute Rights. I have everything else working (elevated priv., Current user being added, breaking inheritance etc.) I just can't seem to figure out how to put this Employee Name field into the Item Level permissions. I think it doesn't like the format it's in.Wed, 25 Nov 2009 15:43:33 Z2009-11-25T20:02:14Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/a0246c33-f6ed-42c2-a05b-2cb3d88bd2cchttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/a0246c33-f6ed-42c2-a05b-2cb3d88bd2ccSanbanhttp://social.technet.microsoft.com/Profile/en-US/?user=SanbanWebPart Feature scoped to Web does not get populated to special group <p>Hi,<br/><br/>We want to deploy a webpart with scope=&quot;Web&quot;, so that it will be available only for a subsite where this feature is activated and we also want to have this webpart to appear under a special category instead of miscellaneous group.<br/><br/>I have created the required feature.xml, elements.xml, .webpart file. This work fine when the feature scope is set &quot;Site&quot;, but when I change the scope to &quot;Web&quot; and then after activating the feature,<br/><br/>1. I do not see the webpart in WebPart gallary.<br/>2. Also when I try to add a webpart using add web part button, I do not see those webparts, I have to explicitly populate those again<br/>3. After explicitly populating those webpart, it comes under the miscellaneous group not in my special group<br/><br/>This means when the webpart feature scope is set to &quot;Web&quot;, none of the properties set in elements.xml and .webpart file are working. Does it mean I cannot create a group for my webpart when then feature scope is set to &quot;Web&quot;<br/><br/>There is an another thread (<a href="http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/87b224e6-8053-4db1-9314-f8f7b6371197">http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/87b224e6-8053-4db1-9314-f8f7b6371197</a>) which has discussed a similar issue, but I don't think it been answered there.<br/><br/>Thanks in advance,<br/>Sanban</p>Tue, 24 Nov 2009 17:48:24 Z2009-11-25T18:37:20Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0e192f84-e9bd-4547-b0fe-f2750c7fd681http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0e192f84-e9bd-4547-b0fe-f2750c7fd681Weinuxhttp://social.technet.microsoft.com/Profile/en-US/?user=WeinuxCounting items in a document library ?Anyone have an idea on how to do the following:<br/> <br/> I have a document library which contains 5 directories, each part of a workflow. From the top level of the document library, i would like to be able to see the number of items in each directory with a simple number field to be able to count all items in a specific directory... Haven't been able to figure out what formula or function to count rows per se..<br/> <br/> Thanks in Advance<br/> MWed, 25 Nov 2009 14:22:15 Z2009-11-25T18:31:10Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/7913ae2c-2d37-46b7-b832-ffca155635dbhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/7913ae2c-2d37-46b7-b832-ffca155635dbMarc Bayé Saltóhttp://social.technet.microsoft.com/Profile/en-US/?user=Marc%20Bay%u00e9%20Salt%u00f3Problems using a FormField in a custom WebControlI'm trying to use a FormField control inside a custom webcontrol to use inside a DataFormWebPart...<br>I've got a DFWP configured to insert data in a list, working correctly.<br>I'm coding a custom webcontrol, I add a Label control to it for testing and works correctly.<br>When I add a FormField I get this error:<br> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><font style="font-size:11px">Server Error in '/' Application.  </font></td></tr> <tr> <td style="background-color:#f7f7f7">--------------------------------------------------------------------------------  </td></tr> <tr> <td> </td></tr> <tr> <td style="background-color:#f7f7f7">Operation is not valid due to the current state of the object.   </td></tr> <tr> <td>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td>Exception Details: System.InvalidOperationException: Operation is not valid due to the current state of the object.  </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td>Source Error:   </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td>Stack Trace:   </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td> </td></tr> <tr> <td style="background-color:#f7f7f7">[InvalidOperationException: Operation is not valid due to the current state of the object.]  </td></tr> <tr> <td>   Microsoft.SharePoint.SPFolder.get_ContentTypeOrder() +434  </td></tr> <tr> <td style="background-color:#f7f7f7">   Microsoft.SharePoint.SPContext.get_ContentTypes() +644  </td></tr> <tr> <td>   Microsoft.SharePoint.SPContext.get_ContentType() +393  </td></tr> <tr> <td style="background-color:#f7f7f7">   Microsoft.SharePoint.SPContext.get_Fields() +104  </td></tr> <tr> <td>   Microsoft.SharePoint.WebControls.FormComponent.get_Fields() +36  </td></tr> <tr> <td style="background-color:#f7f7f7">   Microsoft.SharePoint.WebControls.FieldMetadata.get_Field() +334  </td></tr> <tr> <td>   Microsoft.SharePoint.WebControls.FormField.CreateChildControls() +450  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.EnsureChildControls() +87  </td></tr> <tr> <td>   Microsoft.SharePoint.WebControls.BaseFieldControl.OnLoad(EventArgs e) +176  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.LoadRecursive() +47  </td></tr> <tr> <td>   System.Web.UI.Control.AddedControl(Control control, Int32 index) +318  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.ControlCollection.Add(Control child) +146  </td></tr> <tr> <td>   CRIT.Controls.SPControl.CreateChildControls() +174  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.EnsureChildControls() +87  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +50  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td>   System.Web.UI.Control.PreRenderRecursiveInternal() +170  </td></tr> <tr> <td style="background-color:#f7f7f7">   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041  </td></tr> <tr> <td> </td></tr> <tr> <td style="background-color:#f7f7f7">   </td></tr> <tr> <td> </td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td>--------------------------------------------------------------------------------  </td></tr> <tr> <td style="background-color:#f7f7f7">Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433  </td></tr></tbody></table></div> <br>My custom control:<br> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="border-right:gray 1px solid;padding-right:5px;padding-left:10px;font-size:11px;vertical-align:top;width:5px;color:gray;font-family:Courier New;background-color:#eee;text-align:right"> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><nobr>1</nobr></td> <td><font style="font-size:11px">using System;  </font></td></tr> <tr> <td><nobr>2</nobr></td> <td style="background-color:#f7f7f7">using System.Collections.Generic;  </td></tr> <tr> <td><nobr>3</nobr></td> <td>using System.Linq;  </td></tr> <tr> <td><nobr>4</nobr></td> <td style="background-color:#f7f7f7">using System.Text;  </td></tr> <tr> <td><nobr>5</nobr></td> <td>using Microsoft.SharePoint;  </td></tr> <tr> <td><nobr>6</nobr></td> <td style="background-color:#f7f7f7">using System.Web.UI.WebControls;  </td></tr> <tr> <td><nobr>7</nobr></td> <td> </td></tr> <tr> <td><nobr>8</nobr></td> <td style="background-color:#f7f7f7">namespace CRIT.Controls  </td></tr> <tr> <td><nobr>9</nobr></td> <td>{  </td></tr> <tr> <td><nobr>10</nobr></td> <td style="background-color:#f7f7f7">    public class SPControl:WebControl  </td></tr> <tr> <td><nobr>11</nobr></td> <td>    {  </td></tr> <tr> <td><nobr>12</nobr></td> <td style="background-color:#f7f7f7">        Microsoft.SharePoint.WebControls.FormField Control;  </td></tr> <tr> <td><nobr>13</nobr></td> <td>        Label l;  </td></tr> <tr> <td><nobr>14</nobr></td> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td><nobr>15</nobr></td> <td>        protected override void CreateChildControls()  </td></tr> <tr> <td><nobr>16</nobr></td> <td style="background-color:#f7f7f7">        {  </td></tr> <tr> <td><nobr>17</nobr></td> <td>            base.CreateChildControls();  </td></tr> <tr> <td><nobr>18</nobr></td> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td><nobr>19</nobr></td> <td>            </font><font style="color:red">Control</font><font style="font-size:11px"> = </font><font style="color:blue">new</font><font style="font-size:11px"> Microsoft.SharePoint.WebControls.FormField();  </font></td></tr> <tr> <td><nobr>20</nobr></td> <td style="background-color:#f7f7f7">            </font><font style="color:red">Control.ListId</font><font style="font-size:11px"> = </font><font style="color:blue">SPContext</font><font style="font-size:11px">.Current.ListId;  </font></td></tr> <tr> <td><nobr>21</nobr></td> <td>            </font><font style="color:red">Control.ControlMode</font><font style="font-size:11px"> = </font><font style="color:blue">Microsoft</font><font style="font-size:11px">.SharePoint.WebControls.SPControlMode.New ;  </font></td></tr> <tr> <td><nobr>22</nobr></td> <td style="background-color:#f7f7f7">            </font><font style="color:red">Control.FieldName</font><font style="font-size:11px"> = </font><font style="color:blue">&quot;Title&quot;</font><font style="font-size:11px">;  </font></td></tr> <tr> <td><nobr>23</nobr></td> <td>            this.Controls.Add(Control);  </td></tr> <tr> <td><nobr>24</nobr></td> <td style="background-color:#f7f7f7">                  </td></tr> <tr> <td><nobr>25</nobr></td> <td>            </font><font style="color:red">l</font><font style="font-size:11px">=</font><font style="color:blue">new</font><font style="font-size:11px"> Label();  </font></td></tr> <tr> <td><nobr>26</nobr></td> <td style="background-color:#f7f7f7">            </font><font style="color:red">l.Text</font><font style="font-size:11px">=</font><font style="color:blue">&quot;Hello&quot;</font><font style="font-size:11px">;  </font></td></tr> <tr> <td><nobr>27</nobr></td> <td>            this.Controls.Add(l);  </td></tr> <tr> <td><nobr>28</nobr></td> <td style="background-color:#f7f7f7">        }  </td></tr> <tr> <td><nobr>29</nobr></td> <td>    }  </td></tr> <tr> <td><nobr>30</nobr></td> <td style="background-color:#f7f7f7">}  </td></tr> <tr> <td><nobr>31</nobr></td> <td> </td></tr></tbody></table></div>If I coment line 23, all works correctly and &quot;Hello&quot; is presented, so, I supose I'm missing something in my formfield control initialization... Any idea?<br><br>Thanks in advance!Thu, 16 Oct 2008 10:18:15 Z2009-11-25T17:15:18Z