Web Address Type for LightSwitch

Free

A custom business type to represent Web addresses

(3) Review
Visual Studio
2012, 2010
Download (3,632)
12/1/2011
1.1
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (3)
Q and A (2)
Sign in to write a review
Sort by:

by Dave A Gordon | October 29 2012

by Jan Van der Haegen | January 25 2012

Great extension, I can't wrap my mind around the fact that this wasn't shipped with the LS v1.0 box!

by ADefwebserver | August 15 2011

Sign in to start a discussion


  • Web adres
    4 Posts | Last post January 27, 2012
    • Hey Allesandro,
      
      I noticed recently that the URL "http://www.google" or "http://www.google.c" or "http://www.google.com." are all treated as valid.
      I know it's outside the scope of your book (which I ordered and will hopefully be on my desk in a week or so :-)), but could you have a look at the regex you use to validate the URL? 
      Otherwise great and useful extension, thanks!
    • I ment "http://www.bing" ofcourse ;-)
    • Hi Jan, the code does not use any regular expression. It uses the System.Uri.IsWellFormedURIString method which provides a basic form of validation. For instance, if you type http:/ with one slash the URI is rejected. But I don't think the method can validate domains (and this actually makes sense to me).
      (Very) soon you will be able to download the code and replace the validation with a more sophisticated regex. Thanks for your feedback!
    • Hey Alessandro, 
      thanks for your reply!  I thought there were some better solutions using a regex, but the ones I found can only check basic domain names and extensions ('http://www.bing.com' would be valid, "http://www.bing.c' would not be valid) - I found none that are actually capable of checking an entire web address ("http://www.bing.com/?q=LightSwitch" is almost always 'invalid').
      So: my bad, should have done my research first! 
      Once again, great extension in it's simplicity of use, with great business value!  Keep it up!
  • Default Vertical Alignment
    2 Posts | Last post September 10, 2011
    • The Vertical Alignment defaults to "stretch".  That looks odd - I think it should default "top".
      There also appears a thin-line box around the field when displayed.  I don't see any way to turn that off.
      
      (It would be nice if this control had a property to "Show as link to url")
       
    • Hi, thanks for your feedback.
      
      Actually this extension is the result of a code sample from my upcoming book "Visual Studio LightSwitch Unleashed" whose goal is demonstrating how to build custom business types and is not intended to focus on the control UI side. I'm on time to make some small adjustments to the source code that will be available in the book (readers will be free to change the code :-)) by the way what you ask, especially the "Show as link" feature, is typical from a control perspective, not the business type. 
      I'm going to have a look at the alignment feedback, but I think I won't go to extend the control with additional features that would be out of the scope of the lesson that will be explained in the book.
      
      Cheers,
      Alessandro