Click here to Skip to main content
15,891,253 members
Articles / Web Development / IIS

Editing virtual directories on multiple IIS sites and servers

Rate me:
Please Sign up or sign in to vote.
3.33/5 (9 votes)
18 Jan 2006CPOL5 min read 47.5K   362   25  
A simple tool to view and edit virtual directories settings on multiple web sites and web servers.
Option Strict Off
Option Explicit On 

Imports Microsoft.VisualBasic
Imports System
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

Public Class DataGridColoredTextBoxColumn
  Inherits DataGridTextBoxColumn

  Private HighLightColor As Color = Color.FromArgb(255, 255, 0)

  Public Sub New()
  End Sub

  Protected Overloads Overrides Sub Paint(ByVal g As Graphics, ByVal bounds As Rectangle, ByVal source As CurrencyManager, ByVal rowNum As Integer, ByVal backBrush As Brush, ByVal foreBrush As Brush, ByVal alignToRight As Boolean)
    Try
      Dim o As Object = Me.GetColumnValueAtRow(source, rowNum)
      If (Not (o) Is Nothing) Then
        Dim c As String
        If IsDBNull(o) Then o = ""
        If TypeOf (o) Is VirtualDir Then
          c = CType(o, VirtualDir).ToString()
        Else
          c = CType(o, String)
        End If
        If SearchString <> "" AndAlso c.ToLower().IndexOf(SearchString.ToLower()) >= 0 Then
          backBrush = New SolidBrush(HighLightColor)
        End If
      End If
    Finally
      MyBase.Paint(g, bounds, source, rowNum, backBrush, foreBrush, alignToRight)
    End Try
  End Sub

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
Italy Italy
I was born in 1970.

My first computer experience dates back to early 80s, with a Sinclair ZX81.
From that time on, as many "friends" say, my IT-illness has increased year by year.

I graduated in Electronic Engineering and earned the following Microsoft certifications:
MCP, MCT, MCDBA, MCSD, MCAD, MCSD for .NET (early achiever).

I worked in IT as a developer, a teacher, a consultant, a technical writer, a technical leader.
IT knowledge applied to real life is my primary interest and focus.

Comments and Discussions