|
2008-12-09, 12:13 上午
|
半神

 职务: 超级管理员
 等级: 80级
注册: 2008年1月6日
区域: 华南
经验: 1,267
积分: 1,131
精华: 2
发贴: 590
排名: 26
|
            
|
|
|
首先在C#代码中: SqlConnection conPubs; SqlCommand cmdSelect; SqlDataReader dtrAuthors; conPubs = new SqlConnection("server=localhost;uid=sa;pwd=123; database=yokbase"); cmdSelect = new SqlCommand("Select * from yok_ArticleComment", conPubs); conPubs.Open(); dtrAuthors = cmdSelect.ExecuteReader(); Repeater1.DataSource=dtrAuthors; Repeater1.DataBind(); dtrAuthors.Close(); conPubs.Close(); 然后在设计页面中添加相应的模板:
<%#DataBinder.Eval(Container.DataItem,"UserCode","Conment_Add_Time")%> | <%#DataBinder.Eval(Container.DataItem,"Comment_Content")%> | | <%#DataBinder.Eval(Container.DataItem,"UserCode","Conment_Add_Time")%> | <%#DataBinder.Eval(Container.DataItem,"Comment_Content")%> | <%#DataBinder.Eval(Container.DataItem,"UserCode","Conment_Add_Time")%> | <%#DataBinder.Eval(Container.DataItem,"Comment_Content")%> | <%#DataBinder.Eval(Container.DataItem,"UserCode","Conment_Add_Time")%> | <%#DataBinder.Eval(Container.DataItem,"Comment_Content")%> |
开源时代的到来,对与技术人员是一个巨大的考验
QQ:876162454
|
|
分享按钮 |
IP 地址: 已登录
来自: 已登录
|
|
|
|
|
|
|
|