Some basic project development specifications are gradually summarized ..

Source: Internet
Author: User

I. Naming rules

1. Net Control naming rules

Control identifier + meaning identifier

For example, Lab labels

Lab + UserName

Other control identifiers [abbreviated control names and their habits]: TextBox (Txt), Button (Btn), DropDownList (Drp )....

2. Stored Procedure naming rules.

(1) Stored Procedure prefix + Table name + [field name] + Function Identifier

UP + TableName + ByID + Sel

That is, UserProcedure + TableName + ByID + Select

Select ----> Sel

Update ---> Upd

Delete ----> Del

Insert ----> Ins

(2) other stored procedures

Get + xx + By + Parameter or

Get + xx + By + Parameter1 + Parameter2

Ii. Specification for compiling CS files on the webpage.

 

Code

Using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. Web;
Using System. Web. UI;
Using System. Web. UI. WebControls;

Namespace WebUI. Manage. Manageyewu
{

Protectedvoid Page_Load (object sender, EventArgs e)
{
If (! IsPostBack)
{
BindControls (); // initialize the control first, mainly used to bind the Control Value
BindStyle (); // used to set the style of some controls or whether to display them.
BindJsEvents (); // events to be executed when the control is loaded, typically JS events.
}
}

Privatevoid BindStyle ()
{
ChangeLabUserDisplay ();
}

Privatevoid ChangeLabUserDisplay ()
{
BtnSelCheckBox. Style. Add ("Display", "none ");
}

Privatevoid BindJsEvents ()
{
SelAllCheckBox ();
}

Privatevoid SelAllCheckBox ()
{
BtnSelCheckBox. Attributes. Add ("onclick", "return CheckSe ()");
}

Privatevoid BindControls ()
{
BindRepNews ();
}

Privatevoid BindRepNews ()
{
RepNews. DataSource = Dt;
RepNews. DataBind ();
}

}

}

 

 

Iii. variable naming rules.

1. Name the public global variable in the class: UpperCase

2. Name the private global variable in the class: lowerCase

3. variable name in the method: lowercase

 

The article is very elementary... To be continued... what's wrong. I hope a friend passing by will come up with me.

 

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.