Web Controls

What is the _layouts/15/start.aspx in SharePoint 2013

SharePoint 2013 immediately redirects you to an application page start.aspx when you call a website. If you’ve ever wondered why, keep on reading… The pictures will also look familiar to you. So what happened? Why the start.aspx? The start.aspx inherits Microsoft.SharePoint.ApplicationPages.MDSStartPage. That page simply looks, if the SPContext.Current.Site.CompatibilityLevel is above 14. If not, it’ll redirect to web.Url. That is the behavior, we know from previous versions of SharePoint. Additionally it adds some caching information to the Response, and loads a JavaScript called… start.

Control.ClientID has wrong value

An ASP.NET Controls has a ClientID property. SharePoint Controls inherit from the ASP.NET Controls. The property will give you the ID, the rendered control will have in the HTML source. There is one thing to remember: The ClientID is valid only, if the control has been added to the Controls of the Page!ID **before** adding the control ID **after** adding the control FilterButton **ctl00\_m\_Webpart1_**FilterButton So if you need the ClientID e.

Using SharePoint Controls

Back from vacation. 1 week with an offline version of feeds is hard. So I read the postings I got closely 🙂 One post I do want to bring your attention to, is about SharePoint Controls. My post about using the SharePoint Controls shows how to use the controls you see in forms (TextField, NumberField, LookupField…). There are plenty of SharePoint controls, which you can use. Robin Meure has written a post “re-using SharePoint controls”.

How to use the SharePoint Web Controls – Update

My post How to use the SharePoint Web Controls has been updated. It now shows how to use a generic control for each SPField, instead of picking the corresponding SharePoint Web Control.1: BaseFieldControl webControl = field.FieldRenderingControl; <span class=lnum 2: </spanwebControl.ListId = list.ID; 3: webControl.ItemId = item.ID; <span class=lnum 4: </spanwebControl.FieldName = field.Title;5: webControl.ID = GetControlID(field); <span class=lnum 6: </spanwebControl.ControlMode = mode; Thanks for all the great comments and ideas!

SharePoint Web Controls to access remote content

In my post How to use the SharePoint Web Controls I talked about using the SharePoint Web Controls to show and edit data in SharePoint lists. Today I want to post a sample how to work on a list, which is in another web. The remote list will be the “User Information List” which exists on every rootWeb. 1: // connect to the rootweb, to read the users list <span class=lnum 2: </spanvar rootWeb = SPContext.

How to use the SharePoint Web Controls

SharePoint brings its own controls, which can be used to display list items. In this article I want to show you how to use them in a Webpart. It took me a while to figure this out, because the documentation is kind of incomplete L… OK. Lets start. First lets find out which SharePoint Web Control belongs to which data type in SharePoint. SharePoint Web Control SharePoint data type SharePoint Web Control Single line of text TextField Multiple lines of text PlainText NoteField Rich Text RichTextField Enhanced Rich Text RichTextField Choice Dropdown DropDownChoiceField Radio Button RadioButtonChoiceField Number NumberField Currency CurrencyField Date and Time DateTimeField Lookup Single Item LookupField Multiple Items MultipleLookupField Yes/No BooleanField Person or Group UserField Hyperlink or Picture UrlField Calculated UrlField Business data How do we find which control belongs to the data type?