http://blog.sina.com.cn/gridview[订阅]
个人资料
访客
读取中...
评论
读取中...
分类
    内容读取中…
博文
MOSS 访问自定义列表(2009-05-21 13:10)

void BindList(string roots,string lisUrl,DropDownList dp)
        {

            if (roots.Trim() == ''||lisUrl.Trim()=='')
                goto l1;
            SPSite site = new SPSite(roots );//根站,比如http://ying

            SPWeb web = site.OpenWeb();

            SPList list = web.GetList(lisUrl );//列表的名字/gonghui/Lists/List/AllItems.aspx

moss 访问文档库(2009-05-20 16:49)


        private string backGroundUrl = '';
        [WebBrowsable(true),
        WebDescription('请输入下划线图片URL'),
        WebDisplayName('下划线图片URL'),
        Personalizable(PersonalizationScope.User)]
        public string BackGroundUrl
        {
            get { return backGroundUrl ; }
            set { backGroundUrl  = value; }
        }


        private string itemImgUrl = '';
        [WebBrowsable(true),
   &nbs

Cell.Attributes.Add('background', 'asp\photo.gif')
Cell.Attributes.Add('background', 'C:\asp\photo.gif');
gridview跟数据库绑定很容易,但是苦于GridView显示的字段并不需要全部显示,而且GridView的表头是英文的数据库表中的字段,想把它们变成中文的,修改GridView的header?这是个方法,但是太复杂。想把不想显示的字段用一个visible=false搞定?好像也很不甘心。其实在前台把代码改成如下的形式,这一切问题都迎刃而解。
<asp:GridView ID='GridView2' runat='server' AllowPaging='True' AutoGenerateColumns='False'
        CellPadding='4' 
        ForeColor='#333333' HorizontalAlign='Center' PageSize='8' 
         onrowdatabound='GridView2_RowDataBound'>
        <PagerSettings Visible='False' />
        <Columns>
            <asp:BoundField DataField='assetsNo' HeaderText='资产号' />
            <
下拉框绑定数据库(2009-03-23 13:07)
//显示父类名 void DisplayParent() {
DataTable dt= new DataTable(); dt = DAL.materialsClassParent.getFuzzyDataByI
参考资料:http://www.zzsky.cn/effect/content/1267.htm
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title>中国站长天空-网页特效-导航菜单-仿vista风格的导航菜单</title> <meta http-equiv='content-type' content='text/html;charset=gb2312'> <!--把下面代码加到<head>与</head>之间--> <style type='text/css'> img{border:0pt;} #bottom_div{ width:520px; height:150px; background-color:#b9d1ea; clear:both; } #vista_toolbar{ float:left; font:normal 12px 'Trebuchet MS', 'Arial'; margin:0; padding:0; } #vista_toolbar ul{ background-image:url(http://www.zzsky.cn/effect/images/200902142300_back.gif); background-repeat:repeat-x; float:left; line-height:32px; list-style:none; margin:0; padding:0 10px 0 10px; width:500px; } #vista_toolbar li{ display:inline; padding:0; }