[lnkForumImage]
TotalShareware - Download Free Software

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


 

Srini

3/16/2002 8:19:00 PM

If I fix one thing.... breaks another....

1. in the following code snippet I had to use <ContentTemplate> instead of
<ScriptTemplate> to work.

2. Now I add a list control to the form (with ItemsAsLinks=true), all items
in the list are renderd using <a> tag in UP bowsers. I remove device
specific code to set the right soft key, and now it is rendered as
select/option in uo browser.
I want to be able to use the right soft key and also have the list items
rendered as lists in phones, so that users can use the numeric keypad to
select links.

Any know the answer??

<mobile:Panel id="Panel1" runat="server"> <mobile:DeviceSpecific
id="DeviceSpecific1" runat="server">
<Choice Filter="isWML11"
Xmlns="http://schemas.microsoft.com/mobile/html32template...
<ContentTemplate>
<do type="options" name="cmdMain" label="MAIN">
<go href="Menu.aspx" />
</do>
</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:Panel>
<mobile:List id="lstGrid" runat="server" EnableViewState="False"
Alignment="Left" ItemsAsLinks="True" Wrapping="NoWrap">
<Item Value="Text1" Text="Text"></Item>
<Item Value="Text2" Text="Text"></Item>
<Item Value="Text3" Text="Text"></Item>
</mobile:List>



-S


----- Original Message -----
From: "Jeremy Bostron (MS)" <jerbos@online.microsoft.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet.mobile
Sent: Thursday, March 14, 2002 1:00 PM
Subject: Re: softkeys and pure wml


> Mark,
> You can use the ScriptTemplate to help out with both of your ideas below.
> The scripttemplate is a way to send markup/script down to a device. As
you
> have found, if script is not place in a ScriptTemplate it is not sent to
> the browser. The biggest reason for this is that you typically want to
> only send WML Script to devices that will support it. If the code could
be
> sent outside of the ScriptTemplate then you could get errors on devices
> that do not support the WML Script. The ScriptTemplate allows you to
> define a filter to limit which device or devices will receive the code.
> The ScriptTemplate is created by using a deviceSpecific control directly
on
> a form control. For WML devices, the custom script code will be placed
> after the opening card tag. When using the ScriptTemplate it is very
> important that you limit the script to devices that will support it, since
> the script is static and does not render differently to different devices.
> To limit the devices that will receive a script for a right softkey you
can
> create a devicefilter in the web config for devices that have 2 softkeys.
> This is done by using the NumberOfSoftkeys property that is part of the
> mobileCapabilities class. Below is an example of a device filter created
> in my web.config file:
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <system.web>
> <deviceFilters>
> <filter name="supports2SoftKeys" compare="NumberOfSoftkeys"
> argument="2"/>
> </deviceFilters>
> </system.web>
> </configuration>
>
> One a device filter is created then you can reference the filter in your
> deviceSpecific control as in the example below:
> <mobile:Form id="Form1" runat="server">
> <mobile:DeviceSpecific id="DeviceSpecific1" runat="server">
> <Choice Filter="supports2SoftKeys"
> Xmlns="http://schemas.microsoft.com/mobile/html32template...
> <ScriptTemplate>
> <do type="options" label="Next">
> <go href="microsoft.com" />
> </do>
> </ScriptTemplate>
> </Choice>
> </mobile:DeviceSpecific>
> </mobile:Form>
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Please do not send email directly to this alias. This alias is for
> newsgroup purposes only.
>
> Thanks,
> Jeremy Bostron
> Microsoft Support
> --------------------
> this must be a tough question, eh?
>
> "Mark A Johnson" <MAJohnson@GR.com> wrote in message
> news:##tJ$16nBHA.1516@tkmsftngp07...
> > 1. my first question is regarding the usage of the softkeys.
> >
> > when i create a form with one command control, it shows up as a softkey
> with
> > the wml:
> > <do type="accept"></do>
> >
> > now, i'd like to create another softkey with
> > <do type="options"></do>
> >
> > or something else that will work similarly.
> >
> > how can i do this with the mobile sdk (i'm using beta 2 at the moment)?
> if
> > i add 2 command controls to the form, neither one is rendered as a <do>
> wml
> > object and they're not attached to a softkey. also, i can't find any
> > properties that control their rendering as softkeys.
> >
> >
> > 2. as a separate question, i attempted to create the wml directly in the
> > interface, but that hand-created code never comes through. how do i get
my
> > custom wml to be created and passed to the wireless device?
> >
> > thanks for any help.
> >
> > --mark
> >
> >
>
>
>