C#如何实现Label控件绑定字段并且显示内容

ahjdtjh ahjdtjh 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我想用两个asp:Label控件来绑定数据库中atblLeadsWiki中的DescriptionBrief、DescriptionComplete这两个字段,这个两个控件的ID="Title"和ID="Description",想问一下这样的后台代码该如何去书写!各位帮忙啊!!!
 <table id="tabContent">
<tr>
<td>
<asp:Label ID="Title" runat="server"></asp:Label>
</td>
<td>
<asp:Label ID="Des" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td align="left">
<h2 style="font-weight: bold">
What's It Worth?
</h2>
</td>
<td>
<uc:EstimatedValue ID="EstimatedValue" runat="server" />
</td>
</tr>
<tr>
<td align="left">
<h2 style="font-weight: bold">
Real Market Data
</h2>
</td>
<td>
</td>
</tr>
<tr>
<td align="left">
<h2 style="font-weight: bold">
IGUIDE ABOUT US</h2>
<p style="font-weight: bold">
iGuide is an encyclopedia of antiques and collectibles, with prices. The I is for
INFO. iGuide is millions of WEB pages, each devoted to an individual object in the
Art, Antiques, Collectibles and Memorabilia fields. Dozens of categories are included
in the database, from action figures and baseball cards, comic books to movie posters,
zippo lighters, and everything in between. And we are growing! New pages are being
added daily. iGuide empowers you with price information. iGuide gives you an edge.
You'll buy smarter, and sell smarter.
</p>
<br />
<h2 style="font-weight: bold">
Visit us at<a href="http://www.iguide.net"> www.IGUIDE.NET</a></h2>
</td>
</tr>
<tr>
<td align="center">
<input id="Button1" type="button" value="Print" onclick="Print();" style="width: 100px;
height: 34px" runat="server" />
<asp:Button id="btnclose" Text="Close" runat="server" OnClick="Back" style="width: 100px;
height: 34px;" />
</td>
</tr>
</table>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;

public partial class price_guide_Print : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{

}

protected void Back(object sender, EventArgs e)
{
Response.Redirect("Details.aspx?ItemID=" + Request.QueryString["ItemID"]);
}
}
...全文

相关推荐

用DataList循环实现单选题

用DataList循环实现在线考度单选题的显示,评分。

今晚打破壳

DataList的用法

DataList的用法 很经典的东西 都是我精心收藏的! 奉献给大家 1分 仅1分哦

qq9361235

ASP.NET 2.0动态网站开发基础教程(C#) 第05章 ASP.NET2.0服务器控件 增强 验证(共28页).ppt

基于C#语言的ASP.NET 2.0动态网站开发基础教程,课程列表如下: ASP.NET 2.0动态网站开发基础教程(C#) 第01章 ASP.NET2.0基础 Framework Web Form(共32页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第02章 HTML和脚本语言 VBScript javaScript(共21页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第03章 ASP.NET2.0语言程序设计基础 数据类型 控制语句 类和对象(共28页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第04章 ASP.NET2.0常用对象 response request server session cookie(共17页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第05章 ASP.NET2.0服务器控件 内部 新增 增强 验证(共28页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第06章 ASP.NET数据库编程 ADO ODBC DataSet OLE XML(共27页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第07章 ASP.NET数据库高级操作 数据绑定 GridView(共19页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第08章 导航与用户控件 母版页 统一站点主题(共10页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第09章 ASP.NET Web服务 传送数据(共9页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第10章 配置ASP.NET应用程序 Global.asax Web config 缓存技术(共12页).ppt ASP.NET 2.0动态网站开发基础教程(C#) 第11章 提高ASP.NET应用程序的安全性 身份验证和授权 SSL加密(共9页).ppt

passionSnail

aspx-----新闻发布系统

上学期实训时老师要我们自己用C#语言做的一个新闻发布系统

iesclove

ASP.NET源码——[聊天留言]无痕留言系统_whbook.zip

ASP.NET源码——[聊天留言]无痕留言系统_whbook.zip

易小侠
评论 2
收藏 已收藏
分享
返回顶部
ahjdtjh
C# 111,129 成员 642,540 内容