[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

How can I use tables in Mobile.Net

Igor

3/13/2002 6:05:00 AM

When I create new form through the Mobile Web.Net Wizard
the only controls I can add is the controls on the
toolbar. But I'd like to use all the power of ASP.Net on
mobile forms. I even can't put two buttons on one line.

What's wrong?

Any suggestions?

How can I target Mobile Web applications for iPAQ CE 2002
platform?
3 Answers

Michael Caron

3/13/2002 11:48:00 AM

0

Igor,

The mobile toolkit doesn't really support tables since WML doesn't support
tables. You can do one of the following:

1. Use the "BreakAfter" property of the control and set it to "False". This
will allow the next control to render next to it instead of underneath it.
Then you can sort of get a table effect. However, depending on the device,
this will or will not work. On Pocket IE 2002, it works. On HTML clients it
works too. Not sure on CellPhone browsers.

2. You can use the ObjectList control if you want to display things in a
tabular format. check out the docs for it.

Mike Caron

"Igor" <igorm@anysoft.com> wrote in message
news:1bfd01c1ca4c$bb39fef0$3def2ecf@TKMSFTNGXA14...
> When I create new form through the Mobile Web.Net Wizard
> the only controls I can add is the controls on the
> toolbar. But I'd like to use all the power of ASP.Net on
> mobile forms. I even can't put two buttons on one line.
>
> What's wrong?
>
> Any suggestions?
>
> How can I target Mobile Web applications for iPAQ CE 2002
> platform?


Arvind

3/13/2002 6:31:00 PM

0

you can have two buttons in the same line by setting
BreakAfter = False (Note this tag is supported only
from .NET Final Release )

<mobile:Label id="lbl_Hello" runat="server">
Hello
</mobile:Label>
<mobile:Label id="lbl_World" runat="server"
BreakAfterúlse>
World
</mobile:Label>
The problem with the above is in the alignment.

Iam also trying to find the possibility of using the table
tag in Mobile.
>-----Original Message-----
>When I create new form through the Mobile Web.Net Wizard
>the only controls I can add is the controls on the
>toolbar. But I'd like to use all the power of ASP.Net on
>mobile forms. I even can't put two buttons on one line.
>
>What's wrong?
>
>Any suggestions?
>
>How can I target Mobile Web applications for iPAQ CE 2002
>platform?
>.
>

Rich

3/14/2002 9:58:00 PM

0

> When I create new form through the Mobile Web.Net Wizard
> the only controls I can add is the controls on the
> toolbar. But I'd like to use all the power of ASP.Net on
> mobile forms. I even can't put two buttons on one line.

Igor,

MMIT contains only general components which you can use on all supported
devices. Table will run only on devices with browsers supporting HTML. I you
want to use tables anyway, you can specify part of your code as a HTML
dependend code (CHOICE tag with appropriate Filter, in our case, I specified
that code would run only on devices which support HTML 3.2 - so devices
without HTML support will jump over the code to the next line after
</CHOICE>. Your code can contain several CHOICE tags and they work almost
like switch/case statement in C, C++ language)

Note, that my table contains another mobile components which you can access
thru Collection:

protected void OnLogin(object sender, System.EventArgs e)
{
Label1.Text =
((System.Web.UI.MobileControls.TextBox)Panel2.Controls[0].Controls[3]).Text;
this.ActiveForm = Form2;
}

Following is the ASPX page which contains HTML table:

<mobile:Form id="Form1" runat="server" Font-Size="Large" Font-Bold="False">
<mobile:Panel id="Panel2" runat="server">
<mobile:DeviceSpecific id="DeviceSpecific1" runat="server">
<Choice xmlns="Mobile HTML3.2 Template" Filter="isHTML32">
<ContentTemplate>
<br />
<table cellpadding="0" cellspacing="0" align="center">
<tr>
<td><mobile:Label id="user" runat="server" Text="UserName"
BreakAfter="false"></mobile:Label></td>
<td><mobile:TextBox id="user_box" runat="server" Size="12"
BreakAfter="false"></mobile:TextBox></td>
</tr>
<tr>
<td><mobile:Label id="password" Text="Password" runat="server"
BreakAfter="false"></mobile:Label></td>
<td><mobile:TextBox id="pass" runat="server" Size="12"
BreakAfter="false"></mobile:TextBox></td>
</tr>
<tr>
<td></td>
<td><mobile:Command id="login" OnClick="OnLogin" runat="server"
Text="Login" /></td>
</tr>
</table>
</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:Panel>
</mobile:Form>

Rich