.NET Hyperlink ImageURL

Comments Off

Here’s an interesting article about a bug in this property:

Working Around ASP.NET’s HyperLink ImageUrl Bug

I ran across this bug today but my workaround was surrounding an Image control with anchor tags.

I changed this:

To:


       

Drop Down List Client & Server Side event

Comments Off

Helpful post I found for handling client & server side functions for drop down list during an onchange event

Drop-down-list Client-side onchange stops Server-side SelectedIndexChanged event?

FreeTextBox – FontFacesMenuList , FontFacesMenuNames, FontSizesMenuList, FontSizesMenuNames

Comments Off

I was able to change the font-family and font size drop down lists, see example below using VB.NET.

<FTB:FreeTextBox runat="server" ID="ftb" />
Dim fontFaces() As String = {"Time New Roman", "Georgia", "Arial", "Tahoma", "Wingdings"}
Dim fontFaceNames() As String = {"Time", "Georgia", "Arial", "Tahoma", "Wingdings"}
ftb.FontFacesMenuList = fontFaces
ftb.FontFacesMenuNames = fontFaceNames

Note: The list of font sizes available are 1-7, the default is 3.

Dim fontSizes() As String = {"1", "2", "3", "4", "5", "6", "7"}
Dim fontSizeNames() As String = {"8", "10", "12", "14", "16", "18", "20"}
ftb.FontSizesMenuList = fontSizes
ftb.FontSizesMenuNames = fontSizeNames

5

.NET 2.0 – Event validation fails when postback occurs before a page is rendered completely

Comments Off

http://support.microsoft.com/kb/969548

Solution: Upgrade the system to the .NET Framework 2.0 SP2 or the .NET Framework 3.5 SP1.

Other information related to this issue.

“HTTP Error 404 – File or Directory not found” error message when you request dynamic content with IIS 6.0

Comments Off

I ran across this problem with an ASP page and found a solution on the Microsoft Support site.

Symptoms:
Active Server Pages (ASP) page, ASP.NET page, Internet Services API (ISAPI) application, or Common Gateway Interface (CGI) application on a Windows Server 2003 server running Internet Information Services (IIS) 6.0, give the following error messages:

  1. HTTP Error 404 – File Not Found
  2. HTTP Error 404 – File or Directory not found

Cause:
IIS 6.0 was set to serve only static HTML pages by default on Windows Server 2003

Solution:
Using the IIS manager Allow Active Server Pages under the Web service extensions node.

.NET String.Format

Comments Off

Standard Numeric Format Specifiers
(C) Currency: . . . . . . . . ($123.00)
(D) Decimal:. . . . . . . . . -123
(E) Scientific: . . . . . . . -1.234500E+002
(F) Fixed point:. . . . . . . -123.45
(G) General:. . . . . . . . . -123
(default):. . . . . . . . -123 (default = ‘G’)
(N) Number: . . . . . . . . . -123.00
(P) Percent:. . . . . . . . . -12,345.00 %
(R) Round-trip: . . . . . . . -123.45
(X) Hexadecimal:. . . . . . . FFFFFF85

Standard DateTime Format Specifiers
(d) Short date: . . . . . . . 6/26/2004
(D) Long date:. . . . . . . . Saturday, June 26, 2004
(t) Short time: . . . . . . . 8:11 PM
(T) Long time:. . . . . . . . 8:11:04 PM
(f) Full date/short time: . . Saturday, June 26, 2004 8:11 PM
(F) Full date/long time:. . . Saturday, June 26, 2004 8:11:04 PM
(g) General date/short time:. 6/26/2004 8:11 PM
(G) General date/long time: . 6/26/2004 8:11:04 PM
(default):. . . . . . . . 6/26/2004 8:11:04 PM (default = ‘G’)
(M) Month:. . . . . . . . . . June 26
(R) RFC1123:. . . . . . . . . Sat, 26 Jun 2004 20:11:04 GMT
(s) Sortable: . . . . . . . . 2004-06-26T20:11:04
(u) Universal sortable: . . . 2004-06-26 20:11:04Z (invariant)
(U) Universal full date/time: Sunday, June 27, 2004 3:11:04 AM
(Y) Year: . . . . . . . . . . June, 2004

Standard Enumeration Format Specifiers
(G) General:. . . . . . . . . Green
(default):. . . . . . . . Green (default = ‘G’)
(F) Flags:. . . . . . . . . . Green (flags or integer)
(D) Decimal number: . . . . . 3
(X) Hexadecimal:. . . . . . . 00000003

Where is ASP.NET 3.5 in IIS?

Comments Off

.NET 3.5 is not a stand alone framework like v2.0 or v1.1 . It is just an extension of the 2.0 framework.

See explanation

Securing .NET application and data

Comments Off

Lock Down IIS and SQL Server

Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication

Planning for Extranet or Internet Deployment

Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication

.NET Data Access Architecture Guide

Whys to validate Phone Numbers in C#

Comments Off

using System;
using System.Text.RegularExpressions;

class RegexSubstitution
{
   public static void Main()
   {
      string text = "124";

      if ( !Regex.Match(text,@"^[1-9]\d{2}-[1-9]\d{2}-\d{4}$" ).Success )
      {
         Console.WriteLine( "Invalid phone number");
      }
   }
}

Validate Phone Number

public bool IsValidUSPhone(string number)
{
    return Regex.IsMatch(number, @"\(\d{3}\)\s\d{3}-\d{4}");
}

Matching and Grouping Regular Expressions using Regex in C#

Sending Appointments to an Outlook 2007 Calendar from an ASP.NET 2.0 Web Site

Comments Off

Good article that uses VS 2005 to create an ASP.NET 2.0 web site that can create and send an calendar appointment to add to an Outlook 2007 calendar. Examples in both VB.NET and C#
http://msdn.microsoft.com/en-us/library/bb655909.aspx

Older Entries