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
In general, the solution to small files is to read the file directly on the server and then output, thus avoiding the exposure of the file address, which is a solution. What I want to say now is to use the TransmitFile method to output files
A to send a message to B, a will encrypt the information with a password, and then the encrypted string and the original text sent to B, and then B with the password to decrypt, and then judge the decrypted string and a sent over the original text
But generally speaking, the commonly used simpler has the querystring,session,cookies,application,server.transfer.
First, QueryStringQueryString is a very simple way of passing values, and he can display the value of the transfer in the browser's
Copy Code code as follows:
protected void Page_Load (object sender, EventArgs e)
{
Response.Write (String. Format (the number 1~10 sum equals {0}. ", Sum (1, 10). ToString ()));
}
private int Sum (int min, int max)
{
int s = 0;
for
1, URL rewriting has been very common, but most of the URL rewrite does not support the relative path of the page, if you want to add stress to a project that you've already developed, the second is that Microsoft's URL rewrite is handled according
Asp. NET implementation of multi-domain multi-site Sharing Session value
1, implementation function: You can set which sites can share session value, so as to prevent others to use this to access
To implement this function, you have to put the
Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: system.badimageformatexception: Failed
In your spare time to look back at many of the previous project code, found that there are always a bit of a flaw in the code, such as the barbed bone, annoying. Struggled for a long, well-meaning advised their own future to strive to write some
The advantage of output caching and fragment caching is that it is very easy to implement, and in most cases it is sufficient to use both types of caching. The caching API provides additional flexibility (which is actually quite a lot of flexibility)
①response.redirectThis jump page method jump speed is not fast, because it will take 2 back (2 times postback), but he can jump to any page, no Site page restrictions (that is, can be jumped from Yahoo to Sina), while not skip login protection. But
Copy Code code as follows:
Convert Chinese characters to Pinyin (full spelling)
Chinese character string
Pinyin (full spell) string after conversion
public static string Converte (String hzstring)
{
Match Chinese characters
Regex
A Save a picture to an XML file
Copy Code code as follows:
Save a picture to an XML file
private void Uploadimagetoxml ()
{
Get the filename the user wants to upload
string strfilepathname = LoFile.PostedFile.FileName;
String
The data source is XML, so it expands.
No more nonsense, directly on the code (for some reason, the partial data modified or streamlined).
XML code:
Copy Code code as follows:
Introduction to the Basics of server scriptingFirst, let's review the basics of how Web Server Pages are executed:1, the client through the browser's address bar typing address to send the request to the server side2, the server received the request,
It is easy to implement asp.net to generate random password, the following code gives the complete implementation method:
Copy Code code as follows:
Publicstaticstringmakepassword (Stringpwdchars,intpwdlen)
{
Stringtmpstr= "";
And also is a paroxysmal, there is a user complaints slow, you visit is very fast, local and reproduce not come out? You're lucky to have visited the blog park today, and maybe there's an answer you want--if your site dynamically processes pictures
Method One: Use regular expressions
Copy Code code as follows:
Dirty dictionary data store file path
private static string File_name= "Zang.txt";
Dirty data dictionary table, such as: Dirty data One | Dirty data two | dirty data three
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.