Asp.net Excel operations are frequently encountered in B/S architecture development reports. Common Operations are summarized as follows:Chapter E of MenciusDataGrid output to excel for formattingUse xml2oledb to insert XML files to the databaseUse
For ASP. net web API was born, coupled with its open source (Open Source), so a little infatuated with it, and wrote httpclient + ASP.. NET web API. At that time, ASP. NET web API was still in beta stage. As the saying goes, the 18th change of
1. Create a blank solution, such as: D: \ myproject. sln.
2. Create a web application root directory under D: \ myproject \ webmis and set it to a virtual directory of http: // localhost/webmis
3. create directories by module under the webmis
MVC todayProgramThere are two websites and two homecontrollers with different namespaces. When the website is started,/home/index prompts that there are two homecontroller. The system does not know which one to use.
Register this route by
We use addcategory (for example, the page for adding a library directory). We require that the directory name cannot be blank.
1. Modify addcategory. aspx
2. Create a New formvalidate. js file in the content directory.
3. We can't forget
Application scenarios:
Controls define an attribute as follows:Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Public
Int
?
Dimissionid{
Get
{
If
(Ddldimission.
I want to write mapxtreme 3.0 in Asp.net.
Program The method called by the original ASP is as follows:
Set
Ocourier
=
Server. Createobject (
"
MapInfo. mapxcourier
"
)
Set
Omapx
=
Ocourier. getmapxfromnewserver (
"
World.
You can construct the URL of the current page as follows:
"Http: //" & request. servervariables ("http_host") & request. servervariables ("path_info ")&"? "& Request. servervariables (" QUERY_STRING ")
After obtaining this string, we are
As you can see from scottgu, ASP. net4.0 enables the newThe syntax is used for HTML encoding. HTML encoding is generally used to prevent cross-site attacks (XSS). For more information, see an article I wrote earlier.Article:
When the child form refreshes the parent form, an annoying dialog box is displayed, "you need to resend the information you submitted previously"
Solution: when the child form is disabled
Code:
Window.document.exe ccommand ('Refresh');
Two release methods are introduced here.
1: UseCopysiteFunction.
In fact, it is still an xcopy, that is, it has more functions such as Synchronizing files/connecting to sites. Still put allSource codeReleased together
2: UsePre-compilation
Practice series in ASP. NET mvc3 (II): interface-oriented programming to improve system testability. We mentioned earlierProgramAlthough unit testing is possible.
First, we have exposed the repository attribute of homecontroller.
Second, we have
Add a class: Put the following files in the class. Using system; using system. web; using system. data; using system. data. sqlclient; public class MessageBox {public MessageBox () {}/// /// warning box /// /// warning string // / warning box JS
After the database is created, we can develop it.
1. Create a bookshop ASP. net mvc Web Application
2. Select not to generate the test project (we need to manually create a test later ).
3. generate the following solution
4: We
Today, my colleague wants to execute the. SQL script to restore the initial data. By the way, I will post it to facilitate the implementation.
// Reference system. Diagnostics namespace before applying process.
String infile = system. Web.
If you want to make the Asp.net Application
Program You can use the following methods to specify a custom style table or title for a page:
First, modify the title and style sheet of the In the aspx file.
The
Code :
webform1
Modified code:
After web. config is modified by default, Asp.net
ProgramWill be restarted. To prevent Program Restart, modify
Machine. configFile.
Machine. config is in the c: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ config directory by default.
1. Your Web Fixed server usage IP : Confirm your "Internet Information Service " Is Used in " Default Web Site " And IP The address is " (All unallocated) " Instead IP Address. Then Vs. net Retrying may solve the problem. 2.
1. Multiple controls use the same event to make the code clearer, simpler, and more maintainability
As follows: Multiple buttons share one event.
1. Use the OnCommand event
Protected void Button_Click (object sender, CommandEventArgs
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