Gridview 无法在 Windows Server 2008 上运行,但可以在 Windows 7 IIS 上运行

发布于 2024-12-18 03:49:04 字数 420 浏览 1 评论 0原文

我正在尝试使用 DataBind 函数在 gridview 中显示一些数据。我正在将数据从 MySql 数据库提取到数据集中。我将 gridview 的 DataSource 设置为 DataSet,然后使用 DataBind 函数。

viewFeedbacksGridView是gridview的id,dataSet_result是对应的DataSet。

viewFeedbacksGridView.DataSource = dataSet_result;
viewFeedbacksGridView.DataBind();

该代码在运行 Windows 7 (IIS7) 的计算机上正确显示数据。但是,它不会在运行 Windows Server 2008 Enterprise 的服务器上显示任何内容。

请帮忙! 谢谢!

I am trying to display some data in a gridview using the DataBind function. I am fetching the data from a MySql database into a DataSet. I am setting the DataSource of the gridview to the DataSet and then using the DataBind function.

viewFeedbacksGridView is the id of the gridview and dataSet_result is the corresponding DataSet.

viewFeedbacksGridView.DataSource = dataSet_result;
viewFeedbacksGridView.DataBind();

The code is displaying the data correctly on my machine running Windows 7 (IIS7). But, it does not display anything on the server running Windows Server 2008 Enterprise.

Please Help!
Thanks!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文