New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of asp.net
{
   "Fields":[
      {
         "FieldName":"Name",
         "ReplaceValidationMessageContents":true,
         "ValidationMessageId":"Name_validationMessage",
         "ValidationRules":[
            {
               "ErrorMessage":"Meno musí mať 5 až 40 znakov.",
               "ValidationParameters":{
by Jozef Izso   March 09, 2010 @ 7:37am
Tags: asp.net, mvc
18 Views
no comments
 
C#
public class URLRewriterModule : IHttpModule
    {
        /// <summary>
        /// You will need to configure this module in the web.config file of your
        /// web and register it with IIS before being able to use it. For more information
        /// see the following link: http://go.microsoft.com/?linkid=8101007
        /// </summary>
        #region IHttpModule Members
 
        public void Dispose()
by ZeroDotNet   February 22, 2010 @ 11:04pm
22 Views
no comments
 
XML
  <Target Name="AfterMerge">
  <ItemGroup>
    <JsFiles Include="$(TempBuildDir)\Scripts\infinitecarousel.js;$(TempBuildDir)\Scripts\jquery.autocomplete.js;$(TempBuildDir)\Scripts\core.js"/>
    <CssFiles Include="$(TempBuildDir)\Content\reset.css;$(TempBuildDir)\Content\infinitecarousel.css;$(TempBuildDir)\Content\Site.css" />
  </ItemGroup>
    
  <ReadLinesFromFile File="%(JsFiles.Identity)">
    <Output TaskParameter="Lines" 
            ItemName="jsLines"/>
  </ReadLinesFromFile>
by ArranM   February 16, 2010 @ 2:25pm
117 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Text.RegularExpressions;
using System.Reflection;
using Activity_Search.Code;
 
namespace Activity_Search.Controllers
February 09, 2010 @ 5:31am
35 Views
no comments
 
    /// <summary>
    /// Extension methods on HtmlHelper and UrlHelper that provide strongly-typed access to URLs and ActionLinks for AccountController actions
    /// </summary>
    public static class HelperExtensionsForAccountController
    {
        /// <summary>
        /// Html Helpers for Controller = Account
        /// </summary>
        public static AccountControllerActionLinks Account(this HtmlHelper htmlHelper)
        {
by Ian   February 07, 2010 @ 7:29pm
98 Views
no comments
 
C#
using System;
using System.Collections.Specialized;
using System.Web;
using System.IO;
 
namespace ConfigFileExample.Services
{
    public interface IConfigurationManager
    {
        NameValueCollection AppSettings { get; }
by Bob Cravens   February 03, 2010 @ 2:46pm
42 Views
2 comments
 
C#
       [Test]
       public void Should_create_a_new_meeting()
       {
           _webBrowser.ScreenCaptureOnFailure(() =>
              {
                  Form<LoginInputProxy>("/login/login/index")
                      .Input(m => m.Username, "admin")
                      .Input(m => m.Password, "password")
                      .Submit();
                   
by eric hexter   January 28, 2010 @ 9:39pm
216 Views
no comments
 
C#
public enum StyleConditions {
   IE6OrLess, IE7OrLess
}
 
public static class HtmlHelpers {
   #region Image
   public static string Image(this HtmlHelper helper, string route, string action, int id, int height, int width, int imageType,
      string altText, string cssClass) {
      var urlHelper = new UrlHelper(helper.ViewContext.RequestContext);
      var imageUrl = urlHelper.RouteUrl(route, new RouteValueDictionary(new {
by Richard Kimber   January 20, 2010 @ 1:16pm
243 Views
no comments
 
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!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></title>
    <link runat="server" href="~/style/my.css" rel="stylesheet" type="text/css" />
</head>
<body>
by andreabalducci   January 11, 2010 @ 3:55pm
Tags: asp.net
48 Views
no comments
 
C#
<system.web>
  <pages>
    <controls>
      <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
      <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </controls>
  </pages>
</system.web>
by afsharm   December 24, 2009 @ 5:00am
58 Views
no comments
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryBlockUi._Default" %>
 
<!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">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script type="text/javascript" src="http://malsup.com/jquery/block/jquery.blockUI.js?v2.28"></script>
</head>
<body>
by Elijah Manor   December 09, 2009 @ 10:48am
208 Views
no comments
 
Sub ToggleMvcBuildViews()
    DTE.ExecuteCommand("Project.UnloadProject")
    DTE.ExecuteCommand("OtherContextMenus.StubProject.EditProjectFile")
 
    Dim wasSetToTrue As Boolean = SetMvcBuildView(True)
    Dim wasSetToFalse As Boolean
    If Not wasSetToTrue Then
        wasSetToFalse = SetMvcBuildView(False)
    End If
by Al Gonzalez   December 08, 2009 @ 9:31pm
62 Views
no comments
 
C#
/// <summary>
/// A semi-generic Response Filter that allows transformations
/// to be easily hooked up easily via a TransformStream event    
/// </summary>
public class TransformResponseFilter : Stream
{
    /// <summary>
    /// The original stream
    /// </summary>
    Stream _stream;
by Rick Strahl   November 12, 2009 @ 12:14pm
197 Views
no comments
 
C#
/// <summary>
/// Summary description for ResponseFilter.
/// </summary>
public partial class ResponseFilter : System.Web.UI.Page
{
   protected System.Web.UI.HtmlControls.HtmlForm Form1;
   protected System.Web.UI.WebControls.TextBox TextBox1;
 
   protected void Page_Load(object sender, System.EventArgs e)
   {
by Rick Strahl   November 11, 2009 @ 5:19pm
223 Views
no comments
 
C#
IServiceProvider provider = (IServiceProvider)HttpContext.Current.Context;
HttpWorkerRequest worker = (HttpWorkerRequest)provider.GetService(typeof(HttpWorkerRequest)); 
 
by Rick Strahl   November 08, 2009 @ 4:26pm
44 Views
no comments
 
<!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>
    <title>Redirect Link Using jQuery</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
    <script type="text/javascript">
        
        // Custom Library Function
        var Library = {
by jwwishart   November 04, 2009 @ 5:34pm
66 Views
no comments
 
C#
/// <summary>
/// Returns an application Url that's Theme relative.
/// images/users.gif
/// returns: /myapp/app_themes/{activetheme}/images/users.gif
/// </summary>
public static string ResolveThemeUrl(string themeRelativePath)
{
    string theme = null;
    
    // try to pick up active theme
by Rick Strahl   October 29, 2009 @ 2:04am
44 Views
no comments
 
C#
string strApplID="", strFileType="";
            if (context.Request.QueryString["FileID"] != null)
            {
                strApplID = context.Request.QueryString["FileID"].ToString();
            }
            else
            {
                context.Response.Write("File Not found.. Please try again");
                return;
            }
by Chakravarthy   October 23, 2009 @ 12:00pm
39 Views
no comments
 
Imports System
Imports System.Linq
Imports System.Net.Mail
Imports System.Web.Mvc
Imports System.Web.Security
Imports MvcMembership
 
 
 
<Authorize(Roles:="Administrador")> _
by Eduardo Molteni   October 22, 2009 @ 8:51am
238 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Web;
using AspNetInfo.Core;
 
namespace AspNetInfo.Detectors
{
    public class AspNetDetector : IDetector
    {
        private EnvironmentPermissions _permissions;
by Aaron Jackson   September 29, 2009 @ 7:11am
Tags: asp.net
43 Views
no comments
 
<%@Page language="C#" %>
<!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>
    <link rel="stylesheet" type="text/css" href="../westwind.css" />
    <title>Web Connection Adminstration</title>
    <style type="text/css">
    .containercontent
    {
        padding: 10px;
by Rick Strahl   September 28, 2009 @ 1:32pm
171 Views
no comments
 
C#
private void GetResourceSet()
{
    this.ResourceSet = Request.Form[this.lstResourceSet.UniqueID];
    if (ResourceSet == null)
        this.ResourceSet = Request.QueryString["ResourceSet"];
    if (this.ResourceSet == null)
        this.ResourceSet = ViewState["ResourceSet"] as string;
 
    if (this.ResourceSet == null)
        this.ResourceSet = "";
by Rick Strahl   September 22, 2009 @ 1:17pm
182 Views
no comments
 
C#
--خط زیر را اول تعریف متود مورد نظر قرار دهید
--با تشکر از مسعود
[PrincipalPermission(SecurityAction.Demand, Role = "SomeRole")]
by afsharm   September 22, 2009 @ 8:20am
67 Views
no comments
 
Response.Write("Hello World")
by humayun   September 18, 2009 @ 8:03pm
41 Views
no comments
 
$path = resolve-path .
$rand = New-Object system.random
$port = $rand.next(2048,10240)
$path_to_devserver = "C:\\Program Files (x86)\\Common Files\\microsoft shared\\DevServer\\9.0\\Webdev.WebServer.exe"
 
& $path_to_devserver /port:$port /path:$path
(new-object -com shell.application).ShellExecute("http:\\localhost:$port")
by David R. Longnecker   September 09, 2009 @ 9:51am
174 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