.net wap强制输出WML
强制输出WML:
在web.config
添加下面内容<system.web>下
如果定义相关其它属性可以完整的移动设置属性:
下面代码将能解决IE和模拟器同时高度的问题(同样将下面代码加入system.web节点中)
在web.config
添加下面内容<system.web>下
<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>
<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>
如果定义相关其它属性可以完整的移动设置属性:
<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
activexcontrols=false
win16=false
win32=false
beta=false
ak=false
sk=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"
preferredRenderingType = "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"
canRenderAfterInputOrSelectElement = "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"
cachesAllResponsesWithExpires = "false"
requiresNoSoftkeyLabels = "false"
defaultSubmitButtonLimit = "1"
supportsBold = "false"
supportsItalic = "false"
supportsFontSize = "false"
supportsFontName = "false"
supportsFontColor = "true"
supportsBodyColor = "true"
supportsDivAlign = "true"
supportsDivNoWrap = "false"
supportsCharacterEntityEncoding = "true"
isMobileDevice="false"
</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
activexcontrols=false
win16=false
win32=false
beta=false
ak=false
sk=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"
preferredRenderingType = "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"
canRenderAfterInputOrSelectElement = "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"
cachesAllResponsesWithExpires = "false"
requiresNoSoftkeyLabels = "false"
defaultSubmitButtonLimit = "1"
supportsBold = "false"
supportsItalic = "false"
supportsFontSize = "false"
supportsFontName = "false"
supportsFontColor = "true"
supportsBodyColor = "true"
supportsDivAlign = "true"
supportsDivNoWrap = "false"
supportsCharacterEntityEncoding = "true"
isMobileDevice="false"
</browserCaps>
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<use var="HTTP_USER_AGENT"/>
<filter>
<case match="Unknown" with="%{browser}">
preferredRenderingType = "wml11"
preferredRenderingMime = "text/vnd.wap.wml"
preferredImageMime = "image/vnd.wap.wbmp"
type=Unknown
</case>
</filter>
</browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<use var="HTTP_USER_AGENT"/>
<filter>
<case match="Unknown" with="%{browser}">
preferredRenderingType = "wml11"
preferredRenderingMime = "text/vnd.wap.wml"
preferredImageMime = "image/vnd.wap.wbmp"
type=Unknown
</case>
</filter>
</browserCaps>