Skip to content

Instantly share code, notes, and snippets.

View subhasisrout's full-sized avatar

Subhasis Rout subhasisrout

  • Microsoft
  • India
View GitHub Profile
@subhasisrout
subhasisrout / MainPage.xaml
Created October 10, 2011 19:11
A XAML markup with custom Textbox Template. Default Textbox template is modified to show validation message on the top rather than on right (which is by default)
<UserControl x:Class="SLValidation.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SLValidation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
mc:Ignorable="d"
@subhasisrout
subhasisrout / ConsoleOutputBehavior.cs
Created July 11, 2011 19:49
Server side Message Inspector
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.Description;
namespace WcfService123
{
public class ConsoleOutputBehavior : IEndpointBehavior
{
@subhasisrout
subhasisrout / ConsoleOutputBehavior.cs
Created July 11, 2011 19:45
Client Side Message Inspector
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.Description;
namespace dotnet_topics
{
public class ConsoleOutputBehavior : IEndpointBehavior
{
@subhasisrout
subhasisrout / JSONSerializer.aspx.cs
Created October 28, 2010 18:43
JSON Serializer with custom Javascript converter (used to Datetime formatting)
namespace dotnet_topics3
{
public partial class JavascriptSerializerDemo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Person p1 = new Person() { Name = "Subhasis Rout", Age = 26, DOB = Convert.ToDateTime("1984/06/30") };
Person p2 = new Person() { Name = "Jason Leung", Age = 30, DOB = null };
List<Person> listPerson = new List<Person>() { p1, p2 };
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TreeviewDemo.aspx.cs" Inherits="dotnet_topics3.TreeviewDemo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Tree View Demo - Client side events</title>
<script type="text/javascript">
function OnTreeClick(evt) {
//Instructions:
Right click Sheet in the excel workbook. Click "View Code".
Paste the code below.
Start putting data and formatting will automatically happen
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant