我的移动网站无法在某些手机上呈现。为什么?

发布于 2024-08-13 11:43:25 字数 564 浏览 3 评论 0原文

我正在使用 asp.NET 和 C# 开发一个基本的移动网站,但在某些手机浏览器上呈现 .aspx 页面时遇到问题。

我在诺基亚上尝试了 Stackoverflow.Mobi,寻找编码移动网站的好例子。 一旦我重定向到另一个页面,我就会收到错误“文件格式未知”

一旦我使用button_click事件传输到另一个页面,就会收到“文件格式未知”。 strong> 显示在移动设备上。

我已经尝试了以下许多论坛的建议修复,但没有任何运气。

  1. 设置页面内容类型:ContentType="text/html"
  2. Server.Transfer
  3. Response.ContentType = "application/xhtml+xml";
    Response.Redirect("Test.aspx");
  4. 发布到完整 URL www.XXXX.com/test.aspx

我遇到问题的手机之一是诺基亚 6300

有什么建议吗?

I am developing a basic mobile site in asp.NET and C# and am having problems rendering .aspx pages on certain mobile phone browsers.

I tried Stackoverflow.Mobi on a nokia looking for good examples for coding mobile sites.
As soon as I redirect to another page I receive the error "File Format Unknown."

As soon as i use the button_click event to transfer to another page the "File Format Unknown." shows up on the mobile divice.

I have tried the following as suggested fixes from numerous forums but without any luck.

  1. Setting Page contentype : ContentType="text/html"
  2. Server.Transfer
  3. Response.ContentType = "application/xhtml+xml";
    Response.Redirect("Test.aspx");
  4. Posting to the Full URL www.XXXX.com/test.aspx

One of the phones i am having problems with is a Nokia 6300

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

段念尘 2024-08-20 11:43:25

通常这是doc-type的问题,因为asp.net将其更改为wap/application。我建议您使用 Fiddler 来检查 http 标头。通常情况下,页面指令 ContentType 应该可以解决它,

<%@ Page Language="C#" ... ContentType="text/html" %>

但你已经设置了 :-S

Normaly this is a problem with doc-type, because asp.net changes it to wap/application. I will recommend you use Fiddler for checking http headers. Normaly,Page directive ContentType should solve it

<%@ Page Language="C#" ... ContentType="text/html" %>

But you have set :-S

夏至、离别 2024-08-20 11:43:25

确保您的 html 通过 w3c 验证。我知道 Blackberry 设备在显示 Html 未根据文档类型进行验证的页面时会遇到问题。

Make sure your html passes w3c validation. I know Blackberry device will have trouble displaying pages where the Html does not validate according to the doctype.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文