使用Datareader显示数据库内容 [英] Using Datareader to display database content

查看:61
本文介绍了使用Datareader显示数据库内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我是vb.net的新手,我无法显示我的数据库内容.我想创建一个子菜单(页面内的子页面)以在CMS中使用.

到目前为止,这是我的菜单,因为您可以看到每个子标题都有重复的页面标题.我只希望每个子菜单出现一个页面标题.

关于我们

Hi Folks.

I'm new to vb.net and Im struggling to display the content of my database. I'd like to create a submenu (subpages within pages) to use in my CMS.

Here is my menu so far, as you can see the pagetitles are repeated for each subtitle. I only want one pagetitle to appear for each submenu.

About Us

您的服务

SCHS的平等与多样性团队

Equality and Diversity Team at SCHS

  子页面标题1

   subpage title 1

SCHS的平等与多样性团队

Equality and Diversity Team at SCHS

  子页面标题2

   subpage title 2

SCHS的平等与多样性团队

Equality and Diversity Team at SCHS

   subapeg标题3

   subapeg title 3

SCHS的平等与多样性团队

Equality and Diversity Team at SCHS

  子页面标题4

   subpage title 4

单一平等计划

多样性分支

平等影响评估

质量和安全委员会

联系我们

推荐答案

因此,在while循环结束时,您有一个带有长HTML字符串的变量

So at the end of the while loop, you have a variable with a long HTML string.

这在ASPX页面的代码后面吗?

Is this in an ASPX page code-behind?

如果是这样,要显示它,您需要在页面上放置一个Label控件,并将内容设置为字符串的值.

If so, to display it you need to place a Label control on the page and set the contents to be the value of your string.


这篇关于使用Datareader显示数据库内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆