ASP.NET type validator

September 28, 2009

I had no idea you can use a compare validator to compare a control against a system type.

This example ensures the use types in a number…

<asp:CompareValidator runat="server" ID="valID" Text="*"
ErrorMessage="ID must be an integer" ControlToValidate="txtID"
Type="Integer" Operator="DataTypeCheck" Display="Dynamic">
</
asp:CompareValidator>

Seal and child

September 24, 2009

Seal

Currently reading….

September 22, 2009

Inside the Microsoft&#174; Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer)

Well Christmas is coming

September 22, 2009

I was hoping it would have something totally inappropriate, like a cup holder, cigarette lighter, maybe even a set of curling tongs.

TechChild

September 18, 2009

78527122_a2be74f74e_o

Every time you access or consume a service or resource which is outside your control you should always place in an exception block. However you also want to record the request and response, or maybe dissect the response. In my case a custom exception from an Apache box, running Java soap.

   1: catch (System.Net.WebException ex)
   2: {
   3:     string packet = "";
   4:     using (Stream StreamObj = ((HttpWebResponse)ex.Response).GetResponseStream())
   5:     {
   6:         using (StreamReader sr = new StreamReader(StreamObj, Encoding.UTF8))
   7:         {
   8:             packet = sr.ReadToEnd();
   9:         }
  10:     }
  11:     Console.Write(packet);
  12:     Console.ReadLine();
  13: }
This will drop out the response packet, from the exception
you won’t get the full detail, you need to prompt the CLR to
dig deeper into the WebException object.

2001 a Space odyssey

September 10, 2009

Very useful tools

September 3, 2009

Free

Paid

  • PowerZip – Better than winzip
  • RegexBuddy – for learning writing and testing Regex’s
  • VS2008 (duh)
  • CodeSmith (NetTiers) – If your into coding by numbers
  • Camtasia (for free user Microsoft media encoder, or screen Toaster for short recordings)
  • Charles – HTTP proxy useful in Ajax dev, free version use fiddler 2.0
  • StylusStudio – Heavyweight XML dev
  • MaxiVista – Multiscreen goodness.