Database Access Permissions
Right-click the database file and choose Properties> Security> Add> advanced> Search now> iusr_xxxx & iwan_xxxx
-> OK-> enable the "write" and "modify" permissions of the two users
Note: XXXX is your computer name
If
CopyCode The Code is as follows:
Width = "80px" onafterpaste = "If (isnan (value) Execcommand ('undo ')">
In fact, the server control can also add events such as onkeydown and up.
In this way, only decimals and numbers can be entered.
In.
[Authorize]Public ActionResult Index ()
Marking method. The marked ACTION can be accessed only by authenticated users;
Use
[Authorize (Users = "username")]
Can realize that the marked ACTION can be accessed only by a specific user. The above two
HttpContext. Current. Request. Url. ToString () is not reliable.
If the current URL isHttp: // localhost/search. aspx? User = http://csharp.xdowns.com & tag = % BC % CA % F5
Obtained Through HttpContext. Current. Request. Url. ToString () is
Http: //
The file upload control is: FileUpload.
Asp. Net has a limit on the size of the uploaded files. By default, users can only upload 4 MB files, which may cause inconvenience to users. Therefore, if you want to upload a 40 MB file. Only configuration
Use of the Split function in ASPSplit stringLet's look at several examples.
Copy codeThe Code is as follows: mystr = "1, 2, 3, 4, 5"
Mystr = split (mystr ,",")
For I = 0 to ubound (mystr)
Response. write mystr (I)
Next
'Return value is
CInt is rounded to get the even number closest to it. That is to say, when the decimal part is XXXX, it gets the even number closest to X.5XX.
For example, Cint (0.5) = 0; Cint (1.5) = 2; Cint (2.5) = 2; Cint (3.5) = 4
Int Is the integer function,
Copy codeThe Code is as follows: // TransmitFile for download
Protected void button#click (object sender, EventArgs e)
{
/*
Microsoft provides a new TransmitFile method for the Response object to solve the problem of using Response. BinaryWrite
When
Search on the Internet, you can find a lot of information about this, one of which is a solution from MSDN: http://msdn.microsoft.com/library/default.asp? Url =/library/en-us/dnvs05/html/BedrockASPNET. asp. web. UI. when loading a Page, it is a
Asp.net public variable declaration Problems
1. for type A users, click "register" to enter the registration page. Then, enter the basic information of the user and click "OK" to meet the requirements of type A users.
2. Type B users can log on
Cookie is a set of data stored on the client, which is mainly used to save personal information such as the user name.
Session stores the dialog information.
Application is the information stored in the entire Application, which is equivalent to
Recently, I have been studying and developing server controls. Others have to register resource files such as js and css for controls, or directly register pure script styles. The following problems are encountered:
1. The registered resource file
1. Date formatting method when data control is bound:
Copy codeThe Code is as follows:
2. When using DataBinder. Eval for Data Binding:Copy codeThe Code is as follows: DataBinder. Eval (Container. DataItem, "AddTime", "{0: yyyy-MM-dd }")
3.
When a user asked about the Adapter mode of the design mode the day before yesterday, they said they were not very familiar with it. Let Insus. NET give a simple example. The following animation shows the effect of Insus. NET:
In the above
Objective: To generate table data with a tree structure (EasyUI also has TreeGrid, which only provides an idea) and expand nodes by clicking expand/Contract
Legend:
Class Code:
Copy codeThe Code is as follows: using System;
Using System. Data;
///
:
Code:
Copy codeThe Code is as follows: using System. Data;
Using System. Web. UI. WebControls;
///
/// Generate a drop-down list tree based on the DataTable
///
Public class DropDownListHelp
{
Private string gridline;
Private DataTable
Previously, I thought that the menus were all made through sitemap. Recently, the method in the project was determined by using the XmlDataSource list.
Menusite. xlm file:
Copy codeThe Code is as follows:
Create the
For some systems developed, it is often required to support multiple languages (such as Japanese and English). In the past, most of the practices were to create a resource file,
Set each label, button, and other title text in various languages in
The encoded url is correct. If it can be uploaded to another page, an error will occur and garbled characters will appear in the address bar.1. Set the web. config file
Copy codeThe Code is as follows:
2.asp.net TransferString Name =
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