Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Mobile / May 2004

Tip: Looking for answers? Try searching our database.

Date and SSN formats

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitri Shvetsov - 28 Apr 2004 10:16 GMT
Hi,

Did anybody make a formatted strings for SSN and Date in C# for Mobile
Devices like PDAs? Is it possible at all? I need to implement a formatted
input but I'm afraid that it's impossible for mobile devices.

Any opinion?

Thanks,
Dmitri Shvetsov
Jean-Luc David [MS-MVP] - 02 May 2004 15:36 GMT
Hi Dmitri,

To implement an input method for dates, might I recommend the use
of a SelectionList control. The user can then pick the month, day and
year from a dropdown list and you don't have to worry about formatting.
Just add in validation and you are set. Plus it is supported on a variety of
mobile devices.

As for the SSN, throw on a textbox with the numeric attribute set to "true"
and validate it. Here is a basic example:

<Mobile:Label runat="server">Please select the month:</Mobile:Label>

<Mobile:List runat="server" id="month">
<Item text="January" value="1" />
<Item text="February" value="2" />
<Item text="March" value="3" />
(ect)
</Mobile:List>

<Mobile:Label runat="server">Please select the day:</Mobile:Label>

<Mobile:List runat="server" id="day">
<Item text="1" value="1" />
<Item text="2" value="2" />
<Item text="3" value="3" />
(ect)
</Mobile:List>

<Mobile:Label runat="server">Please select the year:</Mobile:Label>

<Mobile:List runat="server" id="year">
<Item text="2003" value="2003" />
<Item text="2004" value="2004" />
<Item text="2005" value="2005" />
(ect)
</Mobile:List>

<Mobile:Label runat="server">Please enter your SSN
(without spaces or dashes):</Mobile:Label>

<Mobile:TextBox runat="server" Size="9" MaxLength="9"
Numeric="true" id="ssn" />

<Mobile:Command OnClick="SubmitIt"
text="Submit" runat="server" />

I hope this information is helpful. If you need help with the validation
part, let me know.

Thanks,
Jean-Luc David
Microsoft .NET MVP
dotnetmvp@hotmail.com
http://www.stormpixel.com
http://www.mobilecoder.net

----------------------------------------------------------------------------
-

"Dmitri Shvetsov" wrote in message :

> Hi,
>
[quoted text clipped - 6 lines]
> Thanks,
> Dmitri Shvetsov
Dmitri Shvetsov - 03 May 2004 05:53 GMT
Hi,

I was thinking like that, bust one objection killing this idea.

Did you try to arrange the controls horizontally? And What? Did you try to
show them more compact, not so rarely that we theoretically can place one
more between different rows? Yes, I can use a drop down lists to get a
required fields, I can fill these drop downs on the fly, it's easily can be
done, but I can't place these controls as I want, not Microsoft. If you can
help me here I'd be very appreciated.

Thanks,
Dmitri S

> Hi Dmitri,
>
[quoted text clipped - 68 lines]
> > Thanks,
> > Dmitri Shvetsov
Jean-Luc David [MS-MVP] - 03 May 2004 08:09 GMT
Hi Dmitri,

The question is, what PDA or device are you specifically targeting? If
it's something like a PocketPC, then you can use tables to effectively
position your controls.

If you are targeting an XHTML compliant device, then you can create
stylesheets that will precisely position everything on the screen to your
liking.

If the device doesn't support tables or CSS, then you have to deal with
the limitations. One thing you can do to avoid controls appearing on
separate lines is simply adding a Textbox with a Label providing specific
format requirements for the input. Then you add in validation controls to
make sure the user input matches what you are expecting.

If you need some sample code for a specific device, please let me know.

Thanks,
Jean-Luc David
Microsoft .NET MVP
dotnetmvp@hotmail.com
http://www.stormpixel.com
http://www.mobilecoder.net

---------------------------------------------------------------------------
> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Dmitri S
Dmitri Shvetsov - 03 May 2004 17:16 GMT
Hi Jean-Luc,

> The question is, what PDA or device are you specifically targeting? If
> it's something like a PocketPC, then you can use tables to effectively
> position your controls.

What's a difference what PDA I'm targeting? I supposed that all PDAs I'm
working with are having the same resolution and operating system. I'm having
Compaq iPAQ Pocket PC on my table right now.

> If you are targeting an XHTML compliant device, then you can create
> stylesheets that will precisely position everything on the screen to your
> liking.

That would be great! In this case I would rearrange all my buttons, all
functions are implemented as a drop down list with "Execute" button. Anyway
it works and the default/current function is always active in this list. But
I know that sometimes users prefer to have a button set for the same
purposes.

> If the device doesn't support tables or CSS, then you have to deal with
> the limitations. One thing you can do to avoid controls appearing on
> separate lines is simply adding a Textbox with a Label providing specific
> format requirements for the input. Then you add in validation controls to
> make sure the user input matches what you are expecting.
I don't think that these PDAs are so limited.

> If you need some sample code for a specific device, please let me know.
I'd be very appreciated, thanks. All I need is to show all three drop down
lists arranged in one line to select a right date. Probably I can do the
same for SSN using an idea of one-line arrangement.

Thanks,
Dmitri S

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.