PrideRock的专栏

Make something big,make something fun

用户操作
[即时聊天] [发私信] [加为好友]
张英刚ID:PrideRock
71450次访问,排名1494,好友206人,关注者272人。
超越
PrideRock的文章
原创 34 篇
翻译 0 篇
转载 30 篇
评论 138 篇
张英刚的公告
最近评论
sodme:小刚,有个BUG,我用GOOGLE里的删除博客功能删除时,CSDN里确实是把文章删除了,但首页仍然是显示了,点进去之后提示文章已删除.我到后台,重新生成所有页面就好了.
sodme:小刚,有个BUG,我用GOOGLE里的删除博客功能删除时,CSDN里确实是把文章删除了,但首页仍然是显示了,点进去之后提示文章已删除.我到后台,重新生成所有页面就好了.
sodme:小刚,有个BUG,我用GOOGLE里的删除博客功能删除时,CSDN里确实是把文章删除了,但首页仍然是显示了,点进去之后提示文章已删除.
sodme:哈哈,我用此方法,在GOOGLE DOCS里向CSDN发了一博,哇哈哈,以后方便啦.
holon:不错,支持一下
-------------
www.arraylist.cn
程序人生-IT人士的酒吧式交流平台
-------------
文章分类
收藏
    相册
    MetaWeblog API
    技术站点
    800CRM
    CodeProject
    hiDotNet
    HiForums.cn
    PrClub
    SourceForge.net
    朋友的BLOG
    Ben-MySpace
    Ben-Smart Space
    dolphin
    HanLei
    Jacky
    Lion.net
    PrideRoCK
    SkyNews
    VenJiang(RSS)
    一只上进的猪
    梅花雪
    沈逸
    沧海笑一声
    铁拳
    其他
    HzShow
    QHDShow
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 新版本发布,测试发表文章收藏

    新一篇: 发表一个带图片的文章测试测试 | 旧一篇: 发图片测试

    爱的色放

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using CSDN.Share.Controller;
    using CSDN.Share.Contract;
    using System.Collections.Generic;
    
    namespace WebTest
    {
        public partial class _Default : System.Web.UI.Page
        {
            Dictionary res = null;
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                    //BindData();
                    Test();
            }
    
            private void Test()
            {
                string content = string.Empty;
                content = Reducer.GetShareResourceContent(ResourceType.Music, "2");
                Response.Write(content);
            }
            private void BindData()
            {
                string userName = this.TextBox1.Text;
                ShareItemPagedList list = Reducer.GetUserShareList(1, 5, userName, ResourceType.None);
                Reducer r = new Reducer();
                r.Process(list.Items);
                this.ShareData.DataSource = list.Items;
                res = r.Resources;
                this.ShareData.DataBind();
            }
            private string GetContent(int type, string id)
            {
                string key = string.Format("{0}-{1}", type.ToString(), id.ToString());
    
                if (res != null && res.ContainsKey(key))
                {
                    return res[key];
                }
                return "资源已被删除!";
            }
            protected void ShareData_ItemDataBound(object sender, RepeaterItemEventArgs e)
            {
                if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
                {
                    ShareItem item = e.Item.DataItem as ShareItem;
                    Literal l = e.Item.FindControl("Title") as Literal;
                    l.Text = item.Title;
                    l = e.Item.FindControl("CreateDate") as Literal;
                    l.Text = item.CreateDate.ToShortDateString();
                    l = e.Item.FindControl("Content") as Literal;
                    l.Text = GetContent((int)item.ResourceType, item.ResourceId);
                    l = e.Item.FindControl("Description") as Literal;
                    l.Text = string.Format("“{0}”", item.Description);
    
    
                }
            }
    
            protected void Button1_Click(object sender, EventArgs e)
            {
                BindData();
            }
        }
    }
    

    发表于 @ 2008年07月31日 22:13:00|评论(loading...)|收藏

    新一篇: 发表一个带图片的文章测试测试 | 旧一篇: 发图片测试

    评论:没有评论。

    发表评论  


    登录
    Csdn Blog version 3.1a
    Copyright © 张英刚