Posts

Showing posts from 2011

SharePoint 2010 JQuery Slideshow with image fade

Image
1. Download the following Javascript http://www.sendspace.com/file/b0jujl 2. Upload those(Jquery.js and jquery.innerfade.js) to your SharePoint site any document library 3. Copy the URL of each Javascript files 4. select the appropriate Image files and upload them in to another image library of your SharePoint site 4. Now go to your SharePoint site home page and add  Content Editor  web-part 5. Then click  Edit Web-part  in the down arrow in right side and click  Edit HTML  in menu bar 6. Add following scripts in to HTML body of the web-part ( replace red color parts appropriately with the URLs of JavaScript s and URLs of Images ) ========================================== <script src=" /SiteCollectionDocuments/js/jquery.js " type="text/javascript"></script> <script src=" /SiteCollectionDocuments/js/jquery.innerfade.js " type="text/javascript"> </script>

Sharepoint Form Validation using Javascript

Image
1.First open the Newform.aspx which you want to validate.(go to list and go to "New item" page) 2.then add ?PageView=Shared&ToolPaneView=2 part at the end of the urlEx: http://mysite/Lists/job/NewForm.aspx http://mysite/Lists/job/NewForm.aspx?PageView=Shared&ToolPaneView=2 3. Add "Content editor web part " and modify this web part with source editor option 4. Add following javascript which use to validate start date & due date 5. Now use it... 6. If you want to use javascript to validate other field just put following script and modify it as you wish.. <Script language="javascript"> function PreSaveAction() { //add your JavaScript code here and return true / false } </ Script >

Get Client Machine name from web app

Image
If you want to get the client PC name, you can use the following code block. string computer_name; string[] Host_Name = System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_HOST"]).HostName.Split(new Char[] { '.' }); computer_name = Host_Name [0].ToUpper();

Run-time XAML code compiler

Image
XAML (Extensible Application Markup Language)  is a declarative markup language. As applied to the .NET Framework programming model, XAML simplifies creating a UI for a .NET Framework application. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. In both WPF and Silverlight interfaces designing use XAML. In this post I'll show how to execute and display user entered XAML code at the runtime. first you have to create a silverlight application add a text box to take the user inputs (editingTxt) add a text box to display error messages (statusTextBlock) add a border controller to display the output (output) add a button control and put the following code in to button click event             object obj;             try             {                 obj = XamlReader.Load(editingTxt.text);          

Javascript to color Gridview cells based on value

Think that you have to apply a color for a cell and the cell values are " Yes " or " No " put the following Javascript and the Style withing the head tags     <style type="text/css">     .PendingRowStyle     {         padding: 2px;         border: solid 1px #c1c1c1;         color: Black;         background-color:#ffcccc;     }     </style> <script language="javascript" type="text/javascript">    function ColourCell() {      var Grid = document.getElementById("<%=GridView1.ClientID %>");      if (Grid != null) {       for (i = 0; i < Grid .rows.length; i++) {        var cell = Grid .rows[i].cells;        if (cell != null)         if (cell.length == 5) {   // 5 - Number of columns of your grid          if (cell[4].firstChild.data.trim() == "Yes") {   // 4 - cell you want to check            gvDrv.rows[i].all[4].className = " PendingRowStyle";     /

Customizing SharePoint 2010 global navigation with Css and jQuery

The global navigation in SharePoint is an important factor for the SharePoint site, this navigation are there to help orient users so they easily can move around the site. So when it comes to branding and customizing a SharePoint site it´s one of the key factors. When you branding the global navigation don´t forget to think simple but attractive, users may use the site navigation more than they use the search to find information. In SharePoint 2010 the global navigation renders with unordered lists and list items (UL and LI), which gives us a simpler and more standard way for customization, especially compared to previous versions of SharePoint when the navigation rendered in a nestled table markup. There are a couple of ways and tools when it comes to build a custom navigation in SharePoint. The central point for the navigation is the functionality and the look and feel that means that we have to deal with CSS 2.1 or 3.0 and the SharePoint ASP menu control and its data source. A

Content Editor Web Part in SharePoint 2010

Image
How to edit Content Editor Web Part with HTML Text editor in SharePoint 2010? In SharePoint 2010 Editing content Editor Web Part is kind of tricky .  I was unable to find the  source and HTML Text editor in content Editor Web  Part Property section in SharePoint 2010. From Format Text Tab on the ribbon toolbar, I saw the HTML drop down list and selected to edit HTML source but the source I insert is not going into the SharePoint 2010 content editor web part at all. After playing around for while, I came to know how to edit the content editor web part.  I hope this  will help someone who is having issues with SharePoint 2010 Content Editor Web Part. Adding Content Editor Web Part in SharePoint 2010  Editing Tools | Insert | Web Part Under categories go to media and content to add SharePoint 2010 content Editor web part Categories | Media and Content |  Content Editor Click Add to insert Content Editor Web Part in SharePoint 2010 page Your web part will say “ Edit this web part to ad

CommentBox for SharePoint

Image
Anonymous users can read comments, but must sign in to post. Added new parameter “loadLiveProfile” to the CEWP argObj. This defines whether or not to load the profile image and email from the user profile, or to use the values stored in the comment. This will automatically be set to false for anonymous users. To accompany this change i have added some new fields to the configuration list (these will be automatically created when submitting the first comment), and changed the parameters “newCommentText” and “replyText” from string to array. There are changes to these files: CommentBox.js spjs-webservices.js Sample thread: New comment – plain text: New comment – Rich text: List of features Supports both SharePoint 2007 and SharePoint 2010 Tested in IE7, IE9, Safari 5.0.5 for Windows, Firefox 5.0 and Google Chrome 12.0.742.112 Multi level comments You can collapse top level threads Rich text or plain text comments Option to allow the authors to edit their comments Option to le

sharepoint 2010

Image
New features of Sharepoint 2010. 1 0. New SharePoint editions— In an effort to better unify the SharePoint lineup, Microsoft will make some big changes to the SharePoint editions with the 2010 release. Windows SharePoint Server (WSS) is gone, and so is Microsoft Office SharePoint Server (MOSS). The free WSS has been replaced by the new SharePoint Foundation 2010. MOSS is replaced by SharePoint Server 2010, which will be available in either the Standard or Enterprise edition as well as in editions for strictly internal sites and for Internet or extranet sites. 9. New hardware requirements— Like the majority of new Microsoft servers, SharePoint 2010 will ship only as a 64-bit product. If you're deploying SharePoint on new hardware, this situation shouldn't be a problem, but it's definitely a consideration if you're planning to upgrade an existing SharePoint server. 8. New software requirements— In addition to new hardware requirements, SharePoint 2010 will require an x64