jQuery KeyDown Event
A generic JavaScript function to capture a key press and run logic, such as clearing a field on backspace.
function CheckKey(e) {
var keynum;
if (window.event) // IE
{
keynum = e.keyCode;
}Articles, code snippets and news worth sharing.
A generic JavaScript function to capture a key press and run logic, such as clearing a field on backspace.
function CheckKey(e) {
var keynum;
if (window.event) // IE
{
keynum = e.keyCode;
}PowerShell script to create the Word Automation Services service application in SharePoint 2010.
$serviceName = "Word Automation Service"
$appPool = $null
Add-PSSnapin Microsoft.SharePoint.PowerShell
$appPool = Get-SPIisWebServiceApplicationPool -Identity <appPoolName>
if ($appPool -eq $null)A first look at the Visual Studio 11 Beta, with the splash screen and the main IDE window.
A query that returns every trigger in a database with its table, type and whether it is disabled.
USE YourDBName
GO
SELECT trigger_name = sysobjects.name,
trigger_owner = 'x',
table_schema = s.name,
table_name = OBJECT_NAME(parent_obj),Use the Word Automation Services ConversionJob object to bulk convert documents, for example DOCX to PDF, and monitor the job.
Steps to add a jQuery UI autocomplete (type ahead) box to an ASP.NET page, backed by a WCF data service.
Add a custom menu item to the Site Actions menu in WSS 3.0 using a feature, then deploy it with stsadm.
Open a page in a SharePoint 2010 modal dialog from JavaScript and handle the result when it closes.
var options = SP.UI.$create_DialogOptions();
options.width = 450;
options.height = 450;
options.url = "/_layouts/PageName.aspx";
options.showClose = true;
options.title = "Dialog Title";Return all tables in a SQL Server database by querying sys.tables.
USE YourDBName
GO
SELECT *
FROM sys.tablesShow a centred loading image while Ajax calls run, then reveal the page when they finish.
List every stored procedure in a database using INFORMATION_SCHEMA.ROUTINES.
SELECT * FROM
DatabaseName.information_schema.routines
WHERE routine_type = 'PROCEDURE'Populate a dropdown list from a JSON service using $.getJSON and $.each.
$.getJSON("URL", null,
function (data) {
$.each(data.d, function (i, result) {
var optionText = "<option value='" + result.value + "'>"
+ result.text + "</option>";
$('#ddlSelectTagId').append(optionText);