• 初次做网站的随记


     开始时div+css+javascript,这是前台设计的基础,这些是我现在也是必须要完成的,短期时间内要

    完成了解的,

    第二,布局的控制和设置以及显示效果。

    第三,后台代码的实现。代码的简单编写。

    第四,要考虑架构的建立。架构的考虑。

    这几天解决的问题一。处理Repeater控件的嵌套,需要用到OnItemDataBind事件的触发,在最外层的Repeater控件来写。

    在事件中函数内获取第二层中的Repeater,从而绑定这个Repeater的数据。

     protected void Ret_Forsub_DataB(object sender, RepeaterItemEventArgs e)
        {
           
            Repeater rep1 = (Repeater)e.Item.FindControl("rep1");
            string fid = ((Label)e.Item.FindControl("Lbl1")).Text;    //这个是重要的内容的
            string strDisp = "select Module_name,Module_id,Modulept_name,Moderator_name,Modulept_red,Modulept_photo,TipsCount,Sup_Retipcomm from View_SubTpsARps where Module_name='" + fid + "' ";
            dt = DbHelperSQL.GetTable(strDisp);
           rep1.DataSource = dt;
           rep1.DataBind();
        }

    二、Repeater控件的显示列项

      protected void rep1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            int i = e.Item.ItemIndex + 1;
            if (i % 3 == 0 && i > 0)
            {
                e.Item.Controls.Add(new LiteralControl("</tr><tr>"));
            }
        }

  • 相关阅读:
    WEBAPP开发技巧
    手机中的javascript事件
    I6下实现FIXED
    vim 使用帮助
    javascript小技巧
    webkitbox & translate CSS3动画详解
    backbone中的实例中文注释
    getClientRect和getBoundingClientRect获取节点的屏幕距离
    javascript判定不同浏览器
    jQuery中的trigger(type, [data]) 原生实现方法
  • 原文地址:https://www.cnblogs.com/syp1/p/3726743.html
Copyright © 2020-2023  润新知