starmister
unread,Dec 17, 2008, 5:37:45 PM12/17/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Given the complexity of dealing with the conversions between degree/
hour minutes seconds notation and decimal form, you may want to create
a custom control that is comprised of several text boxes and a drop
down or option control, in order to ensure valid entries.
Do the internal conversion processing (instead of using split()
function) on a button click to 'submit' it or after your control loses
focus (user tabs out, clicks somewhere else):
1) set up three text boxes aligned in a row, for collecting numeric
values comprising one total entry. The first box would allow numbers
0 to 180, the next two would hold values 0 to 59. In the first box,
use a simple RegEx allowing 1 to 3 digits and value range of 0 to 180.
For the second and third box, use a RegEx to check for two digits,
and values 0 to 59. After validation, or after tabbing out, you can
prepend a '0' zero to the entered value, if the value entered is less
than 10. (If you need decimal portion of second, you could add
another text box.)
2) to handle negatives, set up a drop down box or option control for
+/- or, if you want to see cardinality indicators, you'll need one for
N/S and one for E/W depending on whether collecting a longitude or
latitude entry.
Hope this idea is helpful.