[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

Problem with mobile:link rendering on Nokia devices

Themos

2/8/2005 10:59:00 AM

Hi,

I have a ASP.NET Mobile site, and have come against a strange bug. A page which contains mobile:link tags renders perfectly on all phones (BreakAfter=True), but strangely enough, on Nokia devices it renders WML content but does not display a br (line break) tag after the anchor link. Any ideas?

You can verify that with the following code:

Dim req As HttpWebRequest
Dim res As HttpWebResponse
Dim rd As IO.StreamReader
Dim bytes() As Byte
req = HttpWebRequest.Create("your_page_with_Links_here")
'Any other agent like SIE-SL45/3.1 UP/4.1.19i renders the br tag after links
req.UserAgent = "Nokia"
res = req.GetResponse()
rd = New IO.StreamReader(res.GetResponseStream)
msgbox rd.ReadToEnd

Posted via DevelopmentNow Groups
www.developmentnow.com/g
www.developmentnow.com
2 Answers

orbyone

2/8/2005 4:48:00 PM

0

Ok, problem solved. Machine.config, even after DeviceUpdate4, has a
strange rendersBreaksAfterWmlAnchor=true for all Nokia''s. To correct
this, add these entries to your web.config (you may also correct
machine.config if you like)

<configuration>
<system.web>
<browserCaps>
<use var="HTTP_USER_AGENT" />
rendersBreaksAfterWmlAnchor="false"
</browserCaps>
</system.web>
</configuration>


Themos



Themos wrote:
> Hi,
>
> I have a ASP.NET Mobile site, and have come against a strange bug. A
page which contains mobile:link tags renders perfectly on all phones
(BreakAfter=True), but strangely enough, on Nokia devices it renders
WML content but does not display a br (line break) tag after the anchor
link. Any ideas?
>
> You can verify that with the following code:
>
> Dim req As HttpWebRequest
> Dim res As HttpWebResponse
> Dim rd As IO.StreamReader
> Dim bytes() As Byte
> req = HttpWebRequest.Create("your_page_with_Links_here")
> ''Any other agent like SIE-SL45/3.1 UP/4.1.19i renders the br tag
after links
> req.UserAgent = "Nokia"
> res = req.GetResponse()
> rd = New IO.StreamReader(res.GetResponseStream)
> msgbox rd.ReadToEnd
>
> Posted via DevelopmentNow Groups
> www.developmentnow.com/g
> www.developmentnow.com

orbyone

2/8/2005 4:48:00 PM

0

Ok, problem solved. Machine.config, even after DeviceUpdate4, has a
strange rendersBreaksAfterWmlAnchor=true for all Nokia''s. To correct
this, add these entries to your web.config (you may also correct
machine.config if you like)

<configuration>
<system.web>
<browserCaps>
<use var="HTTP_USER_AGENT" />
rendersBreaksAfterWmlAnchor="false"
</browserCaps>
</system.web>
</configuration>


Themos



Themos wrote:
> Hi,
>
> I have a ASP.NET Mobile site, and have come against a strange bug. A
page which contains mobile:link tags renders perfectly on all phones
(BreakAfter=True), but strangely enough, on Nokia devices it renders
WML content but does not display a br (line break) tag after the anchor
link. Any ideas?
>
> You can verify that with the following code:
>
> Dim req As HttpWebRequest
> Dim res As HttpWebResponse
> Dim rd As IO.StreamReader
> Dim bytes() As Byte
> req = HttpWebRequest.Create("your_page_with_Links_here")
> ''Any other agent like SIE-SL45/3.1 UP/4.1.19i renders the br tag
after links
> req.UserAgent = "Nokia"
> res = req.GetResponse()
> rd = New IO.StreamReader(res.GetResponseStream)
> msgbox rd.ReadToEnd
>
> Posted via DevelopmentNow Groups
> www.developmentnow.com/g
> www.developmentnow.com