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!
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!
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!
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.