01792.org

Milo

ASP.NET type validator

September 28
by milo 28. September 2009 14:10

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>

Tags:

Seal and child

September 24
by milo 24. September 2009 14:07

Seal

Tags:

Currently reading….

September 22
by milo 22. September 2009 14:35

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer)

Tags:

Well Christmas is coming

September 22
by milo 22. September 2009 14:16

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

Tags:

Blog

TechChild

September 18
by milo 18. September 2009 12:14

78527122_a2be74f74e_o

Tags:

Need the full SOAP packer after an Exception?

September 16
by milo 16. September 2009 16:28

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.

Tags:

2001 a Space odyssey

September 10
by milo 10. September 2009 14:05

Tags:

Very useful tools

September 03
by milo 3. September 2009 12:29

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.

Tags:

Widget Twitter not found.

Root element is missing.X

About the author

Something about the author

Most comments

RecentComments

Comment RSS