background preloader

C#

Facebook Twitter

Sharepoint 2010. Matt Perdeck | Generate CSS sprites and thumbnail images on the fly in ASP.NET sites - part 1. Download the ASP.NET CSS Sprite Generator package - 2934.9 KB This Series Introduction On most web pages, images make up most of the files loaded by the browser to show the page. As a result, you can significantly reduce bandwidth costs and page load times by compressing large images, properly resizing thumbnails and combining small images into CSS sprites to cut down on request/response overhead.

However, doing all this image manipulation manually is a mundane task that takes a lot of time. It was to solve this problem that this ASP.NET CSS Sprite Generator package was born. Adding the ASP.NET CSS Sprite Generator package to an existing site is easy - just add a single dll and a few lines in the web.config - no need to change the site itself. On the fly processing of images inherently puts a greater load on the web server CPU. To make it easy to get started, there is a Quick Start section right after the Installation section. Contents Part 1 Part 2 Part 3 Requirements What are CSS sprites. Log4net Tutorial. Download source code - 218 KB Introduction One of the greatest logging tools out there for .NET is log4net.

This software is the gold standard for how logging should be done. It is simple, powerful, and extensible. The best part is that it is part of the FOSS community. What could be better? Video Tutorial As a supplement to this article, I have created a video tutorial on YouTube that will go over the material in this article. The Basics There are a three parts to log4net. Logging Levels There are seven logging levels, five of which can be called in your code. OFF - nothing gets logged (cannot be called) FATAL ERROR WARN INFO DEBUG ALL - everything gets logged (cannot be called) These levels will be used multiple times, both in your code as well as in the config file. The Configuration The standard way to set up a log4net logger is to utilize either the app.config file in a desktop application or the web.config file in a web application. Root Hide Copy Code Additional Loggers ConfigSections FAQs. ASP.NET AJAX Performance Improvement « LanceZhang’s Blog.

ASP.NET AJAX Performance Improvement I think everyone would agree that AJAX is one of the elements of “Web 2.0″, every web developers should know this technology. I have been collected a list of the popular AJAX Frameworks on my chinese tech blog, we will amazedly found that, there are more than 128 AJAX Frameworks! Refer to a voting result, among the 95% of the .NET developers that said they are using some flavor of Ajax either in production, development or prototype, the most used AJAX Framework is ASP.NET AJAX, with 73,7%, followed by the Ajax Control Toolkit which is used by almost half of the .NET developer that are using Ajax. However, many beginners always complain that, using ASP.NET AJAX make their web application slow down, don’t perform as well as they had hoped. Today, I would like to share some experience on how to optimize the ASP.NET AJAX application.

And I would like to introduce two useful tools for our Performance Analysis: 1. 2. 1. 2. 1. It will cause: 2. 3. 1. 2. ASP.NET AJAX Performance Improvement « LanceZhang’s Blog.

Quartz.Net

Programmatically / Dynamically Setting a Repeaters Template. I've used the repeater in 1k different places for a Million different reasons, but last week I was confronted with a spec that I hadn't yet faced. Usually when I use a repeater on a webpage and I'm setting the item template, I'm using it TO build the Item template. Though I would usually do that in ASP markup. You usually know what the options are for display, and want to make it looks a certain way, and give the user access to the styles through CSS classes. For this spec I needed to give the user the ability to enter their own template options for the Header, Item, Alternating Item, Separator, and Footer Templates. Then at run time, decide which template to use based on a setting stored in a database. I'm going to assume for the sake of brevity that we already know how to create a DB Table that can store a string for each of the mentioned template types and that there is some HTML stored in each template.

But in our case we will start with just - Hope this helps someone else.

REST

The Importance (and Ease) of Minifying your CSS and JavaScript and Optimizing PNGs for your Blog or Website. Primary Objects - .NET Software Development Blog | Kory Becker. Highslide JS - JavaScript thumbnail viewer. Open Source Software in C# C# Der Lebenszyklus einer ASP.NET 2.0 Seite. Eine der wichtigsten Grundlagen für jeden ASP.NET-Entwickler ist die Kenntnis über den "ASP.NET Page Lifecycle". Die meisten ASP-Neulinge verlieren sich anfangs oft in unnötigen Problemen und wundern sich dann, wenn Sie beispielsweise Werte oder einen Status nach dem Ausführen eines Postbacks verlieren. Da HTTP ein zustandsloses Protokoll ist, unterscheidet sich die Webentwicklung, und damit die ASP.NET-Programmierung, von der herkömmlichen Rich-Client Programmierung, z.B. mit Windows Forms.

Dabei sind solche Probleme meist sehr einfach zu vermeiden, wenn ein Entwickler die grundlegenden Kentnisse über den Lebenszyklus einer ASP.NET-Seite besitzt und damit die Abfolge der Verarbeitung der verschiedenen Events einer ASP-Seite kennt. Mit ASP.NET 2.0 wurde - insbesondere auch durch das Konzept der MasterPages - die Verarbeitung der verschiedenen Events noch etwas komplexer als bei seinem Vorgänger. Wichtige Anmerkungen: I. II. Protected override void OnPreInit ( EventArgs e ) { Trace. V. Download Our Free VM Console: Bounce Virtual Machines Without Logging Into VMware & Track VM Health - SolarWinds.

Say Hello to Your New Superpowers: Bounce VMs & Track Up/Down Status Right from Your Desktop! What do you do when a virtual machine is running amuck—or not running at all—and you just want to restart it without slogging through vCenter™ or vSphere™? Act like the superhero you are and bounce that blue-screened troublemaker with our free VM Console! Now you can quickly and easily shutdown and restart a virtual machine—even if you’re not a VMware® administrator. Download our free VM Console and in less time than it takes to request vCenter access or locate your login credentials, you can bring a hung, frozen, or otherwise unresponsive virtual machine back to life. But that’s not all. Plus, VM Console runs in the background on your desktop and monitors the real-time up/down status of all the VMware VMs in your network.That means you can keep a close eye on their antics without logging into vSphere or vCenter.

SQL Agent: A Job Scheduler Framework. Introduction For my last project, I've been using the latest free version of SQL Server, called SQL Server Express Edition, available here. I immediately noticed that the database scheduler was removed since the previous version. I found it really interesting creating my own SQL Agent.

In this article, I'll show you how to create a generic scheduler that runs on a Windows Service. The scheduler will be able to accept pluggable actions that we can develop, later implementing a custom interface. Background This article is about Jobs Scheduling. Install It! The solution provided with this article is composed of four projects: SQLAgent, a Windows Service that wraps the scheduler SQLAgentUI, a Windows Application to control the service from the System Tray EventScheduler, a Class Library containing all the classes composing the Scheduler and the forms to configure it EventSchedulerAction, a Class Library of pluggable actions for the Scheduler jobs SQLAgent.exe -i Run It!

Using the Code Extend It! Articles at C# Online.NET (CSharp-Online.NET) .net stuff.

AsyncTasks & Scheduling

Fastest C# Case Insenstive String Replace. Introduction Dealing with data, for many cases, we need to manipulate strings (strings could be the final form of any data, even binary), and among them, replacement is frequently used. We could find string replacement in .NET is easy, since there are different means to accomplish it, such as String.Replace, System.Text.Regex, iteration of String.SubString, or even using Microsoft Visual Basic RunTime's (Microsoft.VisualBasic.DLL) Strings.Replace function. However, each of them has drawbacks. Hence a new method is discovered to perform fast case insensitive string replacement. Background I am developing a web resource mining system, I need to deal with heavy and large amount of string replacement of site pages. Using the code In .NET, without using C++/CLI, there are a few ways to perform string replacement: The most commonly used method is the String.Replace, but case insensitivity is not supported.

Well, is there any method that could achieve better and even much better performance? Why? Build a C# WebSite Monitor with Email and MSN Messenger Notifica. One of the most common needs of .NET developers and administrator - types is the ability to monitor a production web site and be appropriately notified when the site is down. A few years ago I looked around the marketplace and found only a couple of offerings in this regard, and they were all too "full featured" and expensive for my needs. I also looked at a couple of the online services and found they either were not reliable, didn't have longevity (e.g., if they will still be up and running two weeks from now), or else there was some "baggage" such as advertising that came along with it.So, I rolled my own in VB 6.0 using the NTSrv.ocx control.

It worked great, but I really didn't have the need for it at the time, so I just "retired the code" along with a lot of other stuff that was cluttering up my hard drives when .NET came along. Now I do have the need, and so I looked around again. Surprisingly, I didn't find too much. Download the Original Solution that accompanies this article.