The first time to do a website with a note

Source: Internet
Author: User

At the beginning of the Div+css+javascript, this is the basis of the design of the front desk, which I now also have to complete, short-term time to

Complete the understanding,

Second, the layout of the control and settings as well as the display effect.

Third, the implementation of the background code. Simple writing of the code.

Four, consider the establishment of the architecture. Architecture considerations.

Problem solved in these days one. Handling the nesting of repeater controls requires the triggering of the OnItemDataBind event to be written at the outermost repeater control.

The repeater in the second layer is obtained within the function of the event, thus binding the repeater data.

protected void Ret_forsub_datab (object sender, RepeaterItemEventArgs e)
{

Repeater Rep1 = (Repeater) e.item.findcontrol ("Rep1");
String fid = ((Label) E.item.findcontrol ("LBL1")).    Text; This is the important part.
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 ();
}

Ii. display column items for repeater controls

  protected void Rep1_itemdatabound (object sender, RepeaterItemEventArgs e)
    {
         int i = E.item.itemindex + 1;
        if (i% 3 = = 0 && i > 0)
     & nbsp;  {
            e.item.controls.add (new LiteralControl ("</tr><tr>"));
       }
   }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.