Starting from this blog, we will introduce web development principles 2. In the previous blog, we will mainly introduce some basic web development principles, in this article, we will give an in-depth explanation on the basis of the previous article.
Cookie
Cookie usage is similar to ASP. For example, we create a cookie named aspcn with the value of flying knife.
Httpcookie = new httpcookie ["aspcn"];Cookie. value = "Flying knife ";Response. appendcookie (cookie );
It's easy to
What is Asp.net?
Asp.net is a general languageProgramArchitecture, which can be used by a Web server to build powerful web applications. Asp.net provides many advantages over the current web development model.
Significant improvement in
When writing ASP
Program An error is prompted, "the object tag cannot be placed in another object tag ".
Code For example:
--> -->
This is the code automatically generated when Dreamweaver cs4 inserts flash. Due to the poor compatibility of IE
When a * .aspxfile is requested, the request will be intercepted by the inetinfo.exe process. After determining the file suffix (aspx), it will forward the request to aspnet_isapi.dll, aspnet_isapi.dll sends the request to aspnet_wp.exein the HTTP
Collect some occasional small tips, first column some here, slowly add.
Set title:
This
. Header. Title
=
"
This is a title test.
"
;
Masterpage can be used as follows:
This
. Page. Title
=
Sitemap. currentnode. title;
The following is an example of a console, distributed in. Net remoting, WCF, etc.ProgramCan also be used as follows:
Using system;Using system. Collections. Generic;Using system. LINQ;Using system. text;Using system. Web. caching;Using system. Web;
First, select "Add new Project" in the project, add the "Global. asax" global variable file, and modify the session_start and session_end methods;
Code As follows:
Void session_start (Object sender, eventargs E){// The code that runs when the
Install. net
ProgramAfter entering the address in the address bar, the following error is reported on the webpage:
The XML page cannot be displayed.
XML input cannot be viewed using the XSL style sheet. Correct the error and click Refresh or
Common method
/// /// Send an activation code email/// /// email Public void sendemail (filmsys. model. emailinfo){Try{// The code must be gb2312.Encoding encoding = encoding. getencoding (936 );Mailmessage message = new mailmessage (New
In ASP. net1.1, to transfer data between two listboxes, for example, two ListBox listbox1 and listbox2
Width = "100px"> Single-Chip Microcomputer ProgramDesign "> Network Program Design E-Commerce Computer Graphics Distributed System JSP
Create XMLHttpRequest
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
1
VaR
XMLHTTP
=
Null
;
2
If
(Window. XMLHttpRequest ){
3
XMLHTTP
=
New
1. Download mvccontrib (http://mvccontrib.codeplex.com/releases) components
2. Add the three DLL files in the component to your test project.
3. In Global. asax. CS to be tested in the MVC ProjectCodeOne of them is the default route and
URL ing is a new feature in ASP. NET 2.0. The URL ing technology helps us map a specific URL to another URL. For better understanding, we assume that you have a page named homepage. aspx on the website to access the Home Page. All users also use
Directory:
9.1.some basic principles of Web Development
9.2 Principle 19.2.1 C # The code runs on the server and JS Code runs on the browser client.
9.2.2 "pop-up message window" on the server"
9.2.3 case study (the client and server do not
1. After submitting the page, keep the position of the scroll bar
You can add the MaintainScrollPositionOnPostback command to the page command.
2. After loading the page, move the focus to a control. You only need to specify the DefaultFocus
Asp. NET has many secrets. Once you understand these secrets, you can greatly improve the performance of your ASP. NET applications. For example, when using Membership and profile for Authentication and authorization, you can simply modify
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