Task requirements: Do a login, with automatic memory account and password function, to ensure security, Ajax, no refresh, a good user experience. (Master page)
This is the front page that requires user login
First of all, we analyze
User
To give you an intuitive understanding of the effects of optimization, I prepared the following screenshot of the test results:
Test environment:
1. Windows Server 2003 SP2
2. Viaual Studio 2008, use your own WebDev.WebServer.EXE to run the Web
1. Using the Response.Write method
The code is as follows:
Copy Code code as follows:
Response.Write ("");
The flaw in this approach is that you cannot invoke custom functions in the script file, only internal functions,
Let's first encapsulate a class! This kind of online can be found! There's this class, everything will be easy, haha.
Copy Code code as follows:
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;
Preparatory work
· Customer class
Copy Code code as follows:
public class Customer
{
public int Unid {get; set;}
public string CustomerName {get; set;}
public string Memo {get; set;}
public string Other {get; set;}
}
In the project development, encountered such a situation, is the user repeated submission. Of course this can not blame the user, can only blame. NET or server unresponsive ... That's how I understand it.
Search on the Internet, the solution is
Can be filled out, you can choose, you can automatically search according to the content of the options can be part of the matching items
Details
Copy Code code as follows:
Http://webfx.eae.net/dhtml/combobox/combobox.htm
Put an upload control and a picture control on the page.
Copy Code code as follows:
Write onpropertychange= "Show (This.value)" event in the upload control and call the show function in JS and pass the arguments to JS.
Copy Code code as follows:
Try
{
int readbyte = 0; //
int bytestoread = 100; Data buffer size
String fileName = ".. /.. /writexml.xml "; The file to open
This.textBox1.Text = string. Empty;
Open a picture file and use the picture to
HttpContext.Current.Request.Url.ToString () is not reliable.
If the current URL isHttp://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
The HttpContext.Current.Request.Url.ToString () gets the
. xls format Office2003 and the following versions. xlsx format Office2007 and above version. csv format a comma-delimited string literal (you can save both file types in this format)Two different methods are used to read the first two formats and
asp.net multiple file uploads using the HTML control's file control, you need to add the "enctype=" Multipart/form-data "" in the form.
Up3.aspx File Code
Copy Code code as follows:
Borderwidth= "1px" height=
This article illustrates the method of converting asp.net datetime JSON type to standard time by JS implementation. Share to everyone for your reference, specific as follows:
Directly on the example, as follows:
onload = function () {
var
One: DropDownList1.1 DropDownList binding Data1.1.1 DropDownList Fixed BindingThis approach is suitable for those already fixed data bound to DropDownList.Cases
Copy Code code as follows:
select Gender
Male
Women
Interface layout
There is a "delete" button in the main interface design, which (ID) is btndelete. When the user selects the item to be deleted in the directory browsing, the delete work can be completed by clicking the button.
Code
ASP Full-angle half-angle conversion function
Flag=-1, half angle to full angle
Flag=0 with half angle and full angle
Full angle and half angle when flag=1
Copy Code code as follows:
Function DBC2SBC (STR, flag)
Dim I, SSTR
If
In the project development process, you will often encounter ASP.net repeater control to add ordinal columns, some novice may not, online collection of some, need friends can refer to the
asp.net repeater add an ordinal column
1,
2,
Copy Code code as follows:
1, Rowcommad
Get index
int index = ((GridViewRow) ((Button) (E.commandsource). parent.parent)). RowIndex;
2, rowediting, etc.
Get index
int index = E.neweditindex;
Gets the current GridViewRow object
Method One: First query all the records, and then the logic layer into the phonetic alphabet after the query, obviously a fool will do so.
Method Two: In the need to search the table to add a field for the content of the retrieved fields
The code is as follows:
Copy Code code as follows:
///single sign-on (on)
public void Sign (string ssomethods, String p Assword)
{
//To determine the login situation here the method omits ...
int result = Checklogin
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