Skip to content

Instantly share code, notes, and snippets.

View Microsofttechies's full-sized avatar

Venkat G Microsofttechies

View GitHub Profile
<script src="http://code.jquery.com/jquery.js" type="text/javascript"></script>
<!--Download tmpl "https://code.google.com/p/my-web-js/downloads/detail?name=jquery.tmpl.min.js&can=2&q="-->
<script src="jquery.tmpl.min.js" type="text/javascript"></script>
<script id="movieTemplate" type="text/x-jquery-tmpl">
<li>
<b>{{html Name}}</b>
(<span style="color: Blue"> ${ReleaseYear}</span>) - Director: ${Director}
</li>
</script>
<ul id="results"></ul>
<%-- _lcid="1033" _version="16.0.3020" _dal="1" --%>
<%-- _LocalBinding --%>
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=16.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=1
@Microsofttechies
Microsofttechies / gist:6f62eacb58e8c6542de1
Created September 9, 2014 00:07
SharePoint Custom Refinement
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<title>My Custom Refinement</title>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties>
<mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
<mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes>
<mso:MasterPageDescription msdt:dt="string">lsw.refinement</mso:MasterPageDescription>
@Microsofttechies
Microsofttechies / gist:a322d0fa63c47bba9563
Last active August 29, 2015 14:06
window.addEventListener
<!DOCTYPE html>
<html>
<body>
<p>Click anywhere in the document.</p>
<p id="demo"></p>
<p id="demo1"></p>
<p id="demo2"></p>
<script>
@Microsofttechies
Microsofttechies / gist:472c9086c0941901f8ad
Created September 15, 2014 23:43
jQuery animate right to left
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>slide demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<style>
#toggle {
width: 900px;
height: 30px;
@Microsofttechies
Microsofttechies / gist:d0d5cc04d9b991b15f39
Created September 16, 2014 18:01
slide toggle from right to left and left to right using jquery
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>slide demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<style>
#toggle
{
width: 900px;
@Microsofttechies
Microsofttechies / gist:7f4ad8817d6346138165
Created October 31, 2014 18:52
jQuery Remove Duplicate Values
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('.submitButton').click(function (e) {
var startTime = new Date();
var seen = {};
$('ul li').each(function () {
@Microsofttechies
Microsofttechies / gist:8384755ce1d9461672b8
Created January 16, 2015 16:51
Update Manage Metadata Column
public static void SetManagedMetaDataField(string siteUrl,
string listName,
string itemID,
string fieldName,
string term)
{
ClientContext clientContext = new ClientContext(siteUrl);
List list = clientContext.Web.Lists.GetByTitle(listName);
@Microsofttechies
Microsofttechies / gist:d5eb04e6201f2177eff2
Last active December 9, 2025 15:24
How to prevent XDocument from adding XML version and encoding information C#
XmlDocument xdoc = new XmlDocument();
TextWriter wwriter = new StreamWriter("c:/a.xml");
//Do your logic to add all tags to xdoc
////with Tag <?xml version="1.0" encoding="utf-8"?>
//xdoc.Save(wwriter);
////without tag- <?xml version="1.0" encoding="utf-8"?>
XmlWriterSettings xws = new XmlWriterSettings { OmitXmlDeclaration = true };
using (XmlWriter xw = XmlWriter.Create(wwriter, xws))
@Microsofttechies
Microsofttechies / gist:21450660812d3eda2d14
Last active January 14, 2016 09:14
Aras innovator create an item ApplyAML
//Note for item create use action='add'...for below code -Don't use merge
HttpServerConnection objCon = IomFactory.CreateHttpServerConnection("http://localhost/InnovatorServer/Server/InnovatorServer.aspx", "MyDB", "Admin", "innovator");
Item objItemRes = objCon.Login();
if (objItemRes.isError())
{
throw new Exception("Login Error");
}
Innovator innovator = objItemRes.getInnovator();
////Option 1