CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: Arjan
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE90a
Imports EnvDTE100
Imports System.Diagnostics
 
Public Module Module1
by Arjan   September 13, 2010 @ 8:36am
Tags:
183 Views
no comments
 
XML
<Rectangle x:Name="myRect2" Width="20" Height="20" >
 <Rectangle.Fill>
  <ImageBrush ImageSource="Images/nav_logo13.png" Stretch="None" AlignmentX="Left" AlignmentY="Top" >
   <ImageBrush.Transform>
    <CompositeTransform TranslateX="-20" TranslateY="-20"/>
   </ImageBrush.Transform>
  </ImageBrush>
 </Rectangle.Fill>
</Rectangle>
by Arjan   July 15, 2010 @ 10:35pm
324 Views
no comments
 
C#
{http://laptop-03:18982/_layouts/GEMRoot/Locations.aspx?locationFilter=straat}
    AbsolutePath: "/_layouts/GEMRoot/Locations.aspx"
    AbsoluteUri: "http://laptop-03:18982/_layouts/GEMRoot/Locations.aspx?locationFilter=straat"
    Authority: "laptop-03:18982"
    DnsSafeHost: "laptop-03"
    Fragment: ""
    Host: "laptop-03"
    HostNameType: Dns
    IsAbsoluteUri: true
    IsDefaultPort: false
by Arjan   July 13, 2010 @ 1:02am
Tags:
160 Views
no comments
 
XML
<membership defaultProvider="HellemansMembershipProvider">
  <providers>
    <add name="HellemansMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="GEMBusinesDB" applicationName="GEM" requiresQuestionAndAnswer="false" passwordFormat="Hashed" minRequiredNonalphanumericCharacters="0" />
  </providers>
</membership>
 
by Arjan   July 09, 2010 @ 7:21am
Tags:
181 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using MontfoortIT.WebControls.Extensions;
 
namespace Hellemans.GEM.SharePoint.WebControls.Collections
{
    public class BaseListView : ListView
by Arjan   June 29, 2010 @ 8:46am
Tags:
363 Views
no comments
 
C#
public static IEnumerable<ValidationResult> Validate(object component)
{
    return from descriptor in TypeDescriptor.GetProperties(component).Cast<PropertyDescriptor>()
            from validation in descriptor.Attributes.OfType<System.ComponentModel.DataAnnotations.ValidationAttribute>()
            where !validation.IsValid(descriptor.GetValue(component))
            select new ValidationResult(
                validation.ErrorMessage ?? string.Format(CultureInfo.CurrentUICulture, "{0} validation failed.",     
                validation.GetType().Name),
                new[] { descriptor.Name });
}
by Arjan   June 26, 2010 @ 10:28am
233 Views
no comments
 
C#
public static Control FindControlUsingStack(Control root, string id)
{
   // Seed it.
   Stack<Control> stack = new Stack<Control>();
   stack.Push(root);
 
   while(stack.Count > 0)
   {
      Control current = stack.Pop();
      if (current.ID == id)
by Arjan   June 24, 2010 @ 4:06am
152 Views
no comments
 
C#
public class MonthCollection : List<string>
{
    public MonthCollection()
    {
        DateTimeFormatInfo dfi = Thread.CurrentThread.CurrentCulture.DateTimeFormat;
        foreach (string monthName in dfi.MonthNames)
        {
            Add(monthName);
        }
    }
by Arjan   May 31, 2010 @ 2:11pm
Tags:
174 Views
no comments
 
// Iphone Javascript Clock
var timerID = null;
var timerRunning = false;
function stopclock() {
    if (timerRunning)
        clearTimeout(timerID);
    timerRunning = false;
}
function showtime() {
    var timeValue;
by Arjan   May 18, 2010 @ 5:40am
192 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Collections.Specialized;
 
namespace WebControls
{
    /// <summary>
by Arjan   May 12, 2010 @ 4:34am
264 Views
no comments
 
XML
<location path="Dashboard.aspx">
   <system.web>
      <authorization>
         <allow roles="Administrator, Developer ,Customer" />
         <deny users="*"/>
      </authorization>
   </system.web>
</location>
by Arjan   April 19, 2010 @ 8:03am
Tags:
164 Views
no comments
 
 
//Accordion
    $('.accordion> .accordionContent').hide();
    $('.accordion> .accordionHeader').click(function() {
        var $nextDiv = $(this).next();
        var $header = $(this);
        var $visibleSiblings = $nextDiv.siblings('div:visible');
 
        if ($visibleSiblings.length) {
            $visibleSiblings.prev().toggleClass("open");
by Arjan   April 03, 2010 @ 4:23am
195 Views
no comments
 
//UpdatePanel BusyIndicator
    // gif:     http://www.ajaxload.info
    // html:      <span id="busyIndicator" class="floatRight"></span>
    // #busyIndicator        {width:16px; height:16px;}
    // .busy            {background:transparent url(../Images/ajax-loader.gif) no-repeat scroll left top;}
    
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
by Arjan   April 03, 2010 @ 4:21am
294 Views
no comments
 
//Document Ready
$(document).ready(function() {
 
});
 
//Add ie6 class
if ($.browser.msie && $.browser.version == "6.0") $('body').addClass("ie6");
 
 
//Jquery loaded check
by Arjan   April 03, 2010 @ 4:19am
278 Views
no comments
 
//Collapsible Panel
    $('.titleRow').click(function(){
        var $el = $(this);
        $el.next().slideToggle('fast');
        $el.toggleClass('open');
    });
    //Collapsible Panel width class only
    $('.itemRow').click(function() {
        var $el = $(this);
        $el.next().toggleClass('hide');
by Arjan   April 03, 2010 @ 4:17am
280 Views
no comments
 
//Disable Textbox
    $('#<%=CommentCheckBox.ClientID%>').click(function() {
        if ($("#<%=CommentCheckBox.ClientID%>").attr('checked'))
            $("#<%=CommentTextBox.ClientID%>")
                .val("U heeft er voor gekozen geen opmerkingen te plaatsen")
                .toggleClass('disabled')
                .attr("disabled", "disabled").blur();
        else
            $("#<%=CommentTextBox.ClientID%>")
                .val("")
by Arjan   April 03, 2010 @ 4:14am
240 Views
no comments
 
XML
// Howto to add the sql Memberschip provider and configure a default web application
 
// Register the sql membership provider tables in sql server
// -E      Authenticate with current Windows credentials.
// -S     server
// -d    Database        
// -A    mr        -> Membership and Role manager
    C:\Windows\Microsoft.NET\Framework\v2.0.5027>aspnet_regsql.exe -E -S server-01 -d MyDatabaseCatalogName -A mr
 
// Add membership and roleprovider to Web.config and configure connectionstings:
by Arjan   April 03, 2010 @ 4:04am
306 Views
no comments
 
C#
string hostingPage = Convert.ToString(HtmlPage.Document.GetProperty("referrer"));
string xapUrl = Current.Host.Source.AbsoluteUri;
string applicationRoot = xapUrl.Substring(0, xapUrl.LastIndexOf("ClientBin"));
by Arjan   March 24, 2010 @ 1:17pm
244 Views
no comments
 
C#
// Select all
ItemList.Items.Cast<ListItem>().All(a => a.Selected = true);
 
// Select correct value in Dropdownlist
dropDownList.SelectedIndex =
    dropDownList.Items.IndexOf(
        dropDownList.Items.FindByValue(BusinessCollection.ID.ToString()));
        
radioButtonList.SelectedIndex =
    radioButtonList.Items.IndexOf(
by Arjan   March 24, 2010 @ 12:48pm
197 Views
no comments
 
//Uneven Row 
<%# Container.DisplayIndex % 2 == 0 ? "" : "altRow" %>
 
// Datetime Formatter with Culture
<%# ((DateTime)Eval("LogDatum")).ToString("t", System.Globalization.CultureInfo.CurrentCulture) %>
 
// Datetime Formatter
<%#Eval("LogDatum", "{0:HH:mm}")%>
 
//Nullable Boolean
by Arjan   March 24, 2010 @ 12:45pm
Tags: ASP, Databind
219 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate