I have to be a WAP interface with Unicom recently.
I have selected ASP.NET development, ASP.NET development WAP site, is simple, is the application of a mobile control, don't need WML syntax at all. The only difference is that an ASPX file can support multiple FORMs, different FORMs can be Switch,
Finally, ASP.NET outputs different content according to the device accessed.
If you use IE access, you will output HTML, mobile access, and output WML.
However, many problems have also been encountered during the development process, and some issues are summarized as follows:
1. Simulator selection:
WinWap,
M3gate,
Up.sdk4.0
(Recommended) OpenWave 5.0
(Need to test),
Openwave6.2,
(IIS 6.0 application, IIS5.0 may display, but there is a problem) Checkcom WapBrowser 3.2
Simulator problem:
ASP.NET writes some common simulators, formulated information, written in Machine.Config
In the above simulator, I only have Up.SDK4.0, OpenWave 5.0,
They are just a company's products:
Need to download, formulated file driver updates: The latest version is: Device 4 download, please download:
http://www.microsoft.com/downloads/details.aspx?familyid=02fa15fe-40d9-4dce-9bb1-4dd61a5b7ccb&displayLANG=EN
However, even after driving updates, some devices cannot be accessed:
At this time, it is necessary to force the output WML:
Web.config
Add below
<
BrowserCaps
>
<
Result
Type
= "System.Web.Mobile.Mobilecapabilities, System.Web.Mobile, Version = 1.0.5000.0, Culture = neutral, publickeytoken = b03f5f7f11d50a3a"
/>
<
USE
VAR
= "Http_user_Agent"
/>
PreferredRenderingType = "WML11" preferredrenderingMime = "text / vnd.wap.wml" preferredimagemime = "image / vnd.wap.wbmp"
BrowserCaps
>
If defined related other properties, you can set properties:
<
BrowserCaps
>
<
Result
Type
= "System.Web.Mobile.Mobilecapabilities, System.Web.Mobile, Version = 1.0.5000.0, Culture = neutral, publickeytoken = b03f5f7f11d50a3a"
/>
<
USE
VAR
= "Http_user_Agent"
/>
browser = Unknown version = 0.0 majorversion = 0 minorversion = 0 frames = false tables = false cookies = false backgroundsounds = false vbscript = false javascript = false javaapplets false sk = false activexcontrols = false win16 = false win32 = false beta = false ak = = false aol = false crawler = false cdf = false gold = false authenticodeupdate = false tagwriter = System.Web.UI.Html32TextWriter ecmascriptversion = 0.0 msdomversion = 0.0 w3cdomversion = 0.0 platform = Unknown css1 = false css2 = false xml = false mobileDeviceManufacturer = "Unknown "MobileDeviceModel =" unknown "GatewayVersion =" none "Gatewaymajorversion =" 0 "GatewayminorVersion =" 0 "preferredr enderingType = "wml11" preferredRenderingMime = "text / vnd.wap.wml" preferredImageMime = "image / vnd.wap.wbmp" defaultScreenCharactersWidth = "12" defaultScreenCharactersHeight = "6" defaultScreenPixelsWidth = "96" defaultScreenPixelsHeight = "72" defaultCharacterWidth = " 8 "DefaultCharacterHeight =" 12 "screenbitDepth =" 1 "iscolor =
"False" inputType = "telephoneKeypad" numberOfSoftkeys = "0" maximumSoftkeyLabelLength = "5" canInitiateVoiceCall = "false" canSendMail = "true" hasBackButton = "true" rendersWmlDoAcceptsInline = "true" rendersWmlSelectsAsMenuCards = "true" rendersBreaksAfterWmlAnchor = "false" rendersBreaksAfterWmlInput = "false" rendersBreakBeforeWmlSelectAndInput = "true" requiresAttributeColonSubstitution = "true" requiresPhoneNumbersAsPlainText = "false" requiresUrlEncodedPostfieldValues = "false" requiredMetaTagNameValue = "" rendersBreaksAfterHtmlLists = "true" requiresUniqueHtmlCheckboxNames = "true" requiresUniqueHtmlInputNames = "true" requiresUniqueFilePathSuffix = "true" supportsCss = " False "hidesrightalignedmultiselectscrollbars =" false "canrenderaft erInputOrSelectElement = "true" canRenderInputAndSelectElementsTogether = "true" canRenderOneventAndPrevElementsTogether = "true" canCombineFormsInDeck = "true" canRenderMixedSelects = "true" canRenderPostBackCards = "true" canRenderSetvarZeroWithMultiSelectionList = "true" supportsImageSubmit = "true"
supportsSelectMultiple = "true" requiresHtmlAdaptiveErrorReporting = "false" requiresContentTypeMetaTag = "false" requiresDBCSCharacter = "false" requiresOutputOptimization = "false" supportsAccesskeyAttribute = "false" supportsInputIStyle = "false" supportsInputMode = "false" supportsIModeSymbols = "false" supportsJPhoneSymbols = "false" supportsJPhoneMultiMediaAttributes = "false" maximumRenderedPageSize = "2000" requiresSpecialViewStateEncoding = "false" requiresNoBreakInFormatting = "false" requiresLeadingPageBreak = "false" supportsQueryStringInFormAction = "true" supportsCacheControlMetaTag = "true" supportsUncheck = "true" canRenderEmptySelects = "true" supportsRedirectWithCookie = "true" SupportsemptystringIncookieValue = "true" CachesallResponseswith Expires = "false" requiresNoSoftkeyLabels = "false" defaultSubmitButtonLimit = "1" supportsBold = "false" supportsItalic = "false" supportsFontSize = "false" supportsFontName = "false" supportsFontColor = "true" supportsBodyColor = "true" supportsDivAlign = "
True "supportsdivnowrap =" false "supportscharactereentityEncoding =" true "ismobileDevice =" false "
BrowserCaps
>
The specific properties can mean the test MSDN:
Device function list
MS-help: //ms.msdnqtr.2003feb.2052/mwsdk/html/mwlrfdevicecapabilitiestable.htm
2.
Link: In the same ASPX file, use the link control, # form to switch the different form, there is an error in OpenWave 5.0 test!
It is recommended to pass the program.
ActiveForm is 3.
Garbled: If there is garbled in the development process, by modifying web.config
RequestentEncoding = "GB2312" ResponseEncoding = "GB2312" /> 4. Cancel your mobile device cache: Page.Response.expires = - 1 Response.cacheControl = " Public " ; 5. Redirect redirection RedirectTomobilePage function However, some problems may occur during use It is recommended to use a link control instead.