Private Void Disablechildcontrol (control C ){ If (C Is Textbox) {(C As Textbox). Enabled = False ;} If (C Is Dropdownlist) {(C As Dropdownlist). Enabled = False ;} If (C Is Datetimecontrol) {(C As Datetimecontrol). Enabled = False ;}
1. Try to use UTF-8 encoding for XML files. Some Words in gb2312 cannot be stored, Such ?, Conversion is required even if data can be stored. UTF-8 is also in line with international specifications.
2. on the page, sometimes when the width of
use item. Delete to delete objects. If the number of rows is more than 10, it takes several to two seconds to delete objects, so it is very slow! Generally, the following method is used to delete a large number of rows.
Public void deletedata
The Code is as follows:Calling Web Service
Using system;Using system. runtime. interopservices;Using system. Web. UI;Namespace webpartcollection{[GUID ("d2b37a6c-650c-4ef4-962c-85297f15b0b5")]Public class asywebservicewebpart: system. Web. UI.
The code is taken from the book Liang Jian, Jian Yi. The Code is as follows:
Using system;Using system. Collections. Generic;Using system. text;Using system. Web. UI. webcontrols. webparts;Namespace codeart. Sharepoint. webparts{/// /// You can
Serialization and deserialization when an object is used for transmission
Using system;Using system. Collections. Generic;Using system. text;Using system. xml;Using system. IO;Namespace codeart. SharePoint{/// /// Object serialization/// Public
I. Query
1. Search for a single record. If null is not returned
Xlinfo oxl = dB. xlinfos. firstordefault (P => P. xldm = "100 ");
Xlinfo XL = dB. xlinfos. singleordefault (P => P. xldm = "10 ");If (XL! = NULL)This. textbox1.text = XL. XL;ElseThis.
1. The following is a paging function that uses aspnetpage. The main reason is that the website has a list named News list, And bindgridview is a paging function.
The following is a page for querying a list.
Background code
Entitylist
Code in application page
/// /// Obtain the name of the uploaded file/// /// fileupload id /// name of the uploaded file in the library Protected bool getuploadname (fileupload up, ref string S1){Bool res = true;If (up. hasfile){String sname1 =
There are a lot of code on the Internet, but most of the Code is Framework 3.5 now. For 2.0, some 2.5 methods are not very compatible. It took half an hour to find a suitable method. The record is as follows:
Note: It is not suitable for network
The Code is as follows:
Page_load Method
cblattCase.Items.Clear(); for (int i = 0; i " + item.Attachments[i] + "", i.ToString())); }
Add and delete attachments
/// /// add an attachment /// /// ///
Select D. user_id as 'employee ID ', D. user_name as 'name', C. diathesisconfig_year as 'Year', Case. diathesis_name when' Strain Capacity 'then B. diathesis_detailcontent else ''end as 'adaptability ', Case. diathesis_name when 'learning
Generally, there are three types of jquery plug-in development:
1. jquery Method
2. Global Functions
2. selector (this is too difficult to develop on your own)
In order to avoid conflicts between plug-ins, we generally adopt the closure
Infopath web service with parameter query
One of the WebService. CS methods is getcalculate. The following is the specific code.
[WebMethod] public CalculateInfo GetCalulate(DateTime dtBegin,string sBegin,DateTime dtEnd,string sEnd) {
15.2.1 The object constructor called as a function
When object is called as a function rather than as a constructor, it performs a type conversion.
15.3.3 properties of the function Constructor
The function constructor is itself a function object
First, declare an XMLHTTP variable that saves the XMLHTTPRequest object.Then use XMLHTTP = new XMLHttpRequest () to create this object. This statement is applicable to Firefox, opera, andSafari browser. If it fails, try XMLHTTP = new for Internet
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