Posts

Custom Action with Custom Code

Here is a great example of Custom Action with custom code. You can link your custom action button (ECB menu item) with your custom code. http://www.thorntontechnical.com/tech/sharepoint/sharepoint-2010-context-menu-item-with-custom-code#.UG_K1k3Miz4

SharePoint Interview Questions and Answers

How does Client object model works Q. How does Client object model works? Ans. When we use SharePoint client API’s to perform a specific task, the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or ECMAScript objects for ECMAScript). Q. How many types of Client Object model extension are available in 2010 and when would you use one or the other. Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three...

SharePoint 2010 101 Code Samples

SharePoint 2010 Code Samples for Beginners.  Each code sample is part of the SharePoint 2010 101 code samples project. These samples are provided so that you can incorporate them directly in your code. Each code sample consists of a standalone project created in Microsoft Visual Studio 2010

How to call server side function from client side javascript in ASP.Net?

Image
How to call serverside function from client side javascript in ASP.Net? Call ASP.Net/C# function using Javscript Usually in ASP.net platform, server side functions (all codes written in asp.net,C#) are executing from the server side and all client side funtions (javascript,jquery,ajax) are executing from the client side. Obviously client side functions are too faster than the server side because there is no need to go upto server, will running from the browser itself. But we are unable to written all functions in client side to get good performance. But for this technique, there is some tips can be used. What we are going to do is, we are writing a server side code in ASP.Net,C# and call these functions from client side using javascript and ajax. Steps to Calling ServerSide method from javscript Create a aspx page with three textboxes and a button control. User enter two numbers in first two textboxes and press calculate button. We are fetching entered values an...

How to maintain scroll position after post back?

How to maintain scroll position in ASP.Net Pages When web pages are posted back to the server, by default user is returned to the top of the page. On a large web page, you might have a requirement to scroll down the user automatically to the last position on the page. MaintainScrollPositionOnPostBack page property can be used to achieve this  in one of the following ways. Application level: To set the property by default for all pages in the website, open web.config and add the attribute to the pages node.<pages maintainScrollPositionOnPostBack=”true”> Page Level: for a particular page, open the aspx and set the property<%@ Page MaintainScrollPositionOnPostback=”true” … Code level:  to set the property programmaticallyPage.MaintainScrollPositionOnPostBack = true; Reference : http://tuvianblog.com/2012/01/06/how-to-maintain-scrollposition-after-post-back/