This article describes the ASP.net programming to get the Web site root directory method. Share to everyone for your reference, specific as follows:
There are several ways to get the site root directory:
Server.MapPath
The example in this article describes the method by which ASP.net gets the server-specified folder directory file and provides downloads. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as
We all know that the verification code is displayed in the form of pictures, and is dynamically generated, so that we need to draw it, it has to mention is GDI + drawing
Popular science, what is GDI +?GDI + is an advanced version of the Graphics
This article illustrates the method of ASP.net XML to JSON and share it for everyone's reference. Specifically as follows:
Data is typically stored in XML format in many applications, and data is sent to the client in JSON format for further
Configure in Web.config:
Copy Code code as follows:
Method implementation in the. cs file:File size judgment:
Copy Code code as follows:
public bool Isallowablefilesize ()
{
Read from
there are several conditions for determining whether a method constitutes an overload:
In the same class;
The method name is the same;
The argument list is different.
you should be aware of the issues when designing overloaded methods
1
Today, I met the problem and studied it. To solve this problem, we must first understand some of the mechanism of the session. Session in the server is in the form of a hash table, we all know that sessions are conversational level, each user access
Configure the 404 pages in the configuration file as follows:
Copy Code code as follows:
When you visit the Web site, the error page can be displayed normally, but the HTTP status code is 302, the SEO is very
Many friends in the use of IIS6 Web site encountered a lot of problems, and some of these problems in the past IIS5 inside have encountered, some are new, I have been busy all afternoon, do
A lot of experiments, combined with the previous experience
Copy Code code as follows:
Using System;
Using System.Collections;
Using System.Collections.Generic;
Using System.Text;
Using System.Text.RegularExpressions;
Using System.Security.Cryptography;
Using System.IO;
Using System.Text;
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
The efficiency of stored procedure execution is higher than that of individual SQL statements.
Sample writing stored procedures? Stored procedures are in the programmable directory of the SQL Server 2005 counterpart database.
For example, to create
Copy Code code as follows:
Gets the Excel data for the specified path, the name of the specified workbook: Data from the first sheet
File storage path
Workbook name
If you try to find the data will return a full table,
Copy Code code as follows:
Using System;
Using System.Web;
Namespace Moosoft.OA.Public
{
Cookie Help Class
public class Cookieshelper
{
#region Get Cookies
Get the value of a cookie
public static string Getcookievalue
Our ASP page will be on the remote server to read our desktop Excel file. First, we have to upload it to the remote server and then retrive the data. So, we first design a table and upload it to the server. We have to retrive the data from the file
C
Currency
2.5.ToString("C")
¥2.50
D
Decimal number
ToString("D5")
00025
E
Scientific type
25000.ToString("E")
2.500000E+005
F
Fixed point
ToString("F2")
25.00
Copy Code code as follows:
Session.Abandon ();
Response.Redirect ("Login.aspx");
But this point Click Browser back can still go back to the page just now, this can not be, on the internet for a while, there are many people
One way to take advantage of Excel in ASP is to link the Excel file as a database, and then do something similar to an Access database operation. However, this method is not always useful, and Excel is not a relational database. For a fixed format,
XML (extensible Markup Language) is a kind of markup language based on text format, which pays attention to the description of data structure and data meaning, realizes the separation of content and display style, and is not platform independent.
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