After studying the problem for one afternoon, I finally found the answer from some online materials because the data source for manual programming is not maintained in viewstate. Once PostBack is triggered, the content of the data source is lost.
First, add a namespace.
CopyCode The Code is as follows: using system. Data. oledb;
Protected void page_load (Object sender, eventargs E)
{
If (! Ispostback)
{
Strfile = request. querystring ["FILENAME"]; // path of the File Uploaded from other
If the page is simply created using JS, a large number
CodeAnd is not intuitive.
In Asp.net, we can create user-defined controls and return the HTML code of user-defined controls through Ajax requests.
Copy codeThe Code is as follows: public
I used a three-tier structure for the project. I put the LINQ ing file to the Dal layer, and the ing file is automatically generated by vs2008. It has been normal on the original machine and has no problem at all, when
ProgramWhen I moved to
CopyCode The Code is as follows: public class sqloperation
{
# Region attributes
///
/// The connection string stored in Web. config
///
Protected static string connectionstring = system. configuration. configurationmanager. connectionstrings
CopyCode The Code is as follows: using system;
Using system. Data;
Using system. configuration;
Using system. Web;
Using system. Web. Security;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. webcontrols.
Is to make the web applicationProgramIt always exists from the beginning to the end. Some people may say why not use the application? In fact, the cache can automatically update data within a period of time, and the application cannot do this. In
Similarities:1. the effective scope of the variables stored by the two is the entire application.Program.2. Both of them can store objects.
Differences:1. The application is used in the ASP stage. After being upgraded to. net, the cache is used,
CopyCode The Code is as follows: //
/// Obtain the Excel Data of the specified path and workbook name: obtain the data of the first sheet.
///
/// file storage path
/// workbook name
/// if you find the data, a complete table is returned;
Assume that the current main table is a company table (company ID, company name, company type, company size), and the table is a department table (Department ID, company ID, Manager, contact number ), currently, a company has four departments. On
The client uses an HTML page to call an ashx file (generally HTTP Processing
Program ), Return a custom object in JSON format:
HTML:
CopyCode The Code is as follows:
Ajax test
Name: Type = "text"/> Age:
Type = "text"/>
CopyCode The Code is as follows: Strfilename = strfile
Response. Buffer = true
Response. Clear
Set S = server. Createobject ("ADODB. Stream ")
S. Open
S. type = 1
On Error resume next
Set FSO = server. Createobject ("scripting. FileSystemObject
Function: search the entire database by using a keyword, and then return the table name and column name of the keyword. (Awesome... in particular, when the table where the user name and password are not found during intrusion, if you can directly
First, create a class that inherits from actionresult. Remember to reference the system. Web. MVC namespace as follows:
CopyCode The Code is as follows: public class imageresult: actionresult
{
Public imageformat contenttype {Get; set ;}
Public
Occasionally, due to Path Problems, I thought it was
Program An error occurred. The following is a technical article in my script house, which I will slightly modify for your reference.
For example, your project is webapplication1 (URL: http: //
The following steps are required:
1. Upload the txt file to the company system.
2. Read the required content
3. Insert the content into the database (duplicate needs to be determined)
4. Compare with existing order data
This program only studies to
The first time you enter the aspx page, you need to read a large amount of data. Write to the page. You must delete and modify all the operations on the page. Only when you click the Save button on the page can you write them to the database.
1. Data Structure
Mad_Popedom is the permission table, Control record controller name, Action record Action name.
Mad_Role is the role table.
2. Permission control implementationHere, we use the simple AOP method and MVC Filter implementation. The
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.