Format:
Recent snippets matching tags of ASP.net
/// <summary> /// Returns the content of the POST buffer as string /// </summary> /// <returns></returns> public static string FormBufferToString() { HttpRequest Request = HttpContext.Current.Request; if (Request.TotalBytes > 0) return Encoding.Default.GetString(Request.BinaryRead(Request.TotalBytes));
15 Views
no comments
Try Habanero.Base.GlobalRegistry.ApplicationName = "IGD" Habanero.Base.GlobalRegistry.ApplicationVersion = "v1.0" HabaneroApplication = New Habanero.UI.Win.HabaneroAppWin(Habanero.Base.GlobalRegistry.ApplicationName, Habanero.Base.GlobalRegistry.ApplicationVersion) HabaneroApplication.ClassDefsXml = IGD.BO.BOBroker.GetClassDefsXml() If Not HabaneroApplication.Startup() Then Throw New Exception("Unable to start Habanero Application") End If
43 Views
no comments
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { Response.Write(DropDownList1.SelectedValue); } protected void ButtonSave_Click(object sender, EventArgs e) { int n = SqlDataSource1.Insert(); if (n == 1) Response.Redirect("ViewGuestBook.aspx");
37 Views
no comments
using System; using System.Linq; using System.Text; using System.Web.Mvc; using System.Web.Mvc.Html; using System.Web.Routing; namespace MvcSamples.Html { public static class UrlExtensions
281 Views
1 comments
/* Author: Mohammad Azam http://www.highoncoding.com This is a much better version than I demonstrated in the screencast! */
221 Views
no comments
{
"Fields":[
{
"FieldName":"Name",
"ReplaceValidationMessageContents":true,
"ValidationMessageId":"Name_validationMessage",
"ValidationRules":[
{
"ErrorMessage":"Meno musí mať 5 až 40 znakov.",
"ValidationParameters":{
147 Views
no comments
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()
83 Views
no comments
<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>
567 Views
no comments
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
99 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)
{
410 Views
no comments
using System; using System.Collections.Specialized; using System.Web; using System.IO; namespace ConfigFileExample.Services { public interface IConfigurationManager { NameValueCollection AppSettings { get; }
186 Views
2 comments
[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();
373 Views
no comments
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 {
456 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>
123 Views
no comments
<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>
120 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>
455 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
202 Views
no comments
/// <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;
291 Views
no comments
/// <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) {
352 Views
no comments
IServiceProvider provider = (IServiceProvider)HttpContext.Current.Context;
HttpWorkerRequest worker = (HttpWorkerRequest)provider.GetService(typeof(HttpWorkerRequest));
118 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 = {
138 Views
no comments
/// <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
114 Views
no comments
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; }
85 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")> _
463 Views
no comments
using System; using System.Collections.Generic; using System.Web; using AspNetInfo.Core; namespace AspNetInfo.Detectors { public class AspNetDetector : IDetector { private EnvironmentPermissions _permissions;
84 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
