您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->达达ASP.NET企业信息管理系统>>ViewContent.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:达达ASP.NET企业信息管理系统


当前文件路径:DaDaEnterprise/ViewContent.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Collections; 3using System.Configuration; 4using System.Data; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.HtmlControls; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11 12public partial class ViewContent : System.Web.UI.Page 13{ 14 protected void Page_Load(object sender, EventArgs e) 15 { 16 if (!IsPostBack) 17 { 18 string cls = "select * from [Class] order by Sort"; 19 DataList1.DataSource = DataAccess.GetDataSet(cls); 20 DataList1.DataBind(); 21 22 //左边作品数据源 23 string Works = "select top 15 * from [Works] order by id desc"; 24 Repeater3.DataSource = DataAccess.GetDataSet(Works); 25 Repeater3.DataBind(); 26 27 string sql = "select * from [View] where id =" + Request.QueryString["id"]; 28 DataTable Dt = DataAccess.GetDataTable(sql); 29 Title = ConfigurationManager.AppSettings["Web"] + "- 建站心得 - " 30 + Dt.Rows[0]["Name"].ToString() + ""; 31 Label1.Text = Dt.Rows[0]["Name"].ToString(); 32 Label2.Text = Dt.Rows[0]["ComeFrom"].ToString(); 33 Label3.Text = Dt.Rows[0]["Time"].ToString(); 34 Label4.Text = Dt.Rows[0]["ViewCont"].ToString(); 35 } 36 } 37 38 /// <summary> 39 /// 字符截断 40 /// </summary> 41 /// <param name="scatitle"></param> 42 /// <param name="cid"></param> 43 /// <returns></returns> 44 public static string getleft(string scatitle, int cid) 45 { 46 string rtn = ""; 47 if (scatitle.Trim().Length > cid) 48 { 49 rtn = scatitle.Substring(0, cid) + "..."; 50 } 51 else 52 { 53 rtn = scatitle; 54 } 55 return rtn; 56 } 57} 58
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:达达ASP.NET企业信息管理系统

- 学生成绩智能管理系统源码

- Asp.net简单防刷新图片计数器..

- CodematicS3三层结构示例项目..

- 邓西网站帮助系统NET+SQL开源..

- 达达ASP.NET企业信息管理系统..

- 仿csdn论坛简易论坛(vb.net)..

- FreeTextBox 1.6.3 中文版及源码

- 掘客Digg新闻发掘系统源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号