Posts

Showing posts from January, 2012

Cannot assign to 'obj' because it is a 'foreach iteration variable'

Image
I asked during a job interview is there a difference between for to  foreach are not in terms of performance in terms of working with objects. Can I update the same set of both? Desalination to see which candidate did not know the answer. I'm not going to explain who was stronger for or foreach . That you can read the article by Dustin Campbell - Performance of foreach vs. List.ForEach . So I'll give a practical example, explain the difference from for to foreach when both cases I'm going to update my system. Here's the code for example: Is for  or/and  foreach will update the List ? using  System; using  System.Collections.Generic; using  System.Linq; using  System.Text; using  System.Collections; namespace  CheckFor {      class   Program     {          static   void  Main( string [] args)      ...

SharePoint - Export to Spreadsheet (excel) Not Work

Image
Did you have a case where you wanted to work in Excel at sharepoint list view, but you had no some fields (like lookup field)? Can not " Export to Spreadsheet "? I had the case! Two solutions: 1 - Install SPD (is free). 2 - Because not every time we run straight to install the SharePoint Designer. The solution to install SharePoint.ExportDatabase activeX . Here's how to install the activeX of the excel Run from Address Bar this code javascript: var x =new ActiveXObject("SharePoint.ExportDatabase"); Address bar To see that it worked, do the following ... 1. Go to (from IE) tools -> Internet Option Internet Option 2. Programs -> Manage add-ons Manage add-ons 3. All add-ons All add-ons And see that ActiveX is enable :) There are more activexs needed to operate the sharepoint javascript: var x = new ActiveXObject("Microsoft.XMLDOM"); javascript: var x = new ActiveXObject("ListNet.ListNet...

Webpage error details. Object required

Image
Not long ago, I created a new master-page (from scratch) at SharePoint Designer . I'm done to add all the controls - looks good! But when I started working with web-parts - had a little problem. D rag and Drop did not work. I received the following error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E) Timestamp: Sun, 8 Jan 2012 11:46:30 UTC Message: Object required Line: 1571 Char: 3 Code: 0 URI: http://yoururl/ie55up.js Webpage error details. Object required Google search brought me to the following blog: Neil Mosafi  - http://neilmosafi.blogspot.com/2007/11/sharepoint-dragging-webparts-causes.html When I added the code - he really helped me < script language ="javascript" type ="text/javascript"> function MSOLayout_GetRealOffset(StartingObject, OffsetType, EndParent) {  ...