Showing posts from September, 2011

Customize EntityEditorWithPicker with AfterCallbackClientScript

Working With Customize EntityEditorWithPicker with AfterCallbackClientScript  

First download the custom picker control by going to the following link


Why we need to customize the above code. Once the user select the city from the picker we need to automatically fill up the City PIN no. as well as the City STD Code ect.

EntityPicker control is the AfterCallbackClientScript Property which allows you to provide a name of a JavaScript function that will be executed after an entity has been chosen/resolved.
Once you add the following line of code in your page. (as you downloaded from the link that provided above in layout page PickerPage.aspx)
<SPSolutions:CityEditorid="CityEditorSingle"runat="server" MultiSelect="false" ValidatorEnabled="false" MaximumEntities="1"/>

<tr> <td>City Pin Number</td> <td><asp:TextBoxID="txtPinNumber"runat="server"></asp:Te…

SharePoint 2010 Role Assignment & Anonymous

Role Assignment & Anonymous method using code Anonymous Access  Role Assignment in item level

1. Anonymous Access  
privatevoidRestrictedFormPagesCode_Click(objectsender,EventArgse) {
SPSitesite =newSPSite("http://home"); SPWeb_web = site.RootWeb; _web.AnonymousPermMask64 = _web.AnonymousPermMask64 ^SPBasePermissions.ViewFormPages;            _web.Update(); }

 2. Role Assignment in item level
privatevoidRoleAssignment_Click(objectsender,EventArgse) {
SPSitesite =newSPSite("http://home"); SPWeb_web = site.RootWeb; SPListItemtaskitem = CreateAssignTask(_web);


In this Post we learn. How to create custom action in various locations.
We learn.
1.Insert simple custom action button in Standard Menu. 2.Insert simple custom action in List Edit. a.Using Unique RegistrationId ie List URL ie {$ListId:Lists/contacts;}" (only work for sandbox solutions) b.Using Unique RegistrationId ie List GUID.
1.Open visual studio 2010 under SharePoint2010 create empty SharePoint project. 2.Add empty element from file menu. 3.In element.xml add xml.

Solution 1 :Insert simple custom action button in Standard Menu.

<?xmlversion="1.0"encoding="utf-8"?> <Elementsxmlns="">   <CustomAction Title="Test Links" Description="this is going to be a tool tip" Location="Microsoft.SharePoint.StandardMenu" GroupId="SiteActions" Rights="ManageWeb">     <UrlActionUrl="javascript:alert('hello world site url is {SiteUrl}…