Edit Note: After learning these things, you can perform all ASP operations on the database independently.
11 methods for connecting to a database using ASP -- This article summarizes the methods for connecting to various databases using ASP:
1.
Original article address:Http://www.frontfree.net/view/article_742_page1.html
Read thisArticlePreparationsBefore reading this article, you need to understand the following knowledge. Otherwise, you may encounter different levels of problems in the
You may have encountered such a situation.
Run similar
Code
Streamreader SR
=
New
Streamreader (
"
Test.txt
"
);
The system prompts "cocould not find file 'C:" Windows "System32" test.txt ".This is caused by incorrect
1. obtain common attributes of the access path in the Asp.net context:
? Context. Request. physicalapplicationpath"E:" "xumh" "eductaction" "webform08" "asp_net_http """
? Context. Request. physicalpath"E:" "xumh" "eductaction" "webform08"
1. Bin folder
Bin folder contains applications
Program Required for controls, components, or any other
Code Deployment assembly. Any. DLL files in this directory are automatically linked to the application.
2. app_browser folder
This optional
CompileProgramSometimes we want a dialog box to pop up when the program is running, giving you some prompts, especially the prompts for incorrect operations and confirmation of important information modification.
There are many examples of the
I. Currently, there are several methods for passing values on pages in ASP. NET:
1. Form submission,....Form1.submit ();....This method is invalid in ASP. NET, because ASP. NET forms are always submitted to their own pages. If you want to submit
Strongly typed method.
1. First in the Source PageCodeBlock, declare a public attribute;
2. Add the command in the rendering block of the target page, and specify the virtualpath attribute.
3. Use previouspage to directly call the Public
Asp.net supports multilingual sites
1. Create two resources files on the web site as follows:
File Information in resources. resx
File Information in resources. en-us.resx
Default. aspxCode
Code
Code
From: http://hi.baidu.com/ldy201001/blog/item/22e15edef479ae5295ee37c9.html When uploading a file, you often need to determine whether the folder exists. If yes, upload the file. Otherwise, create a folder and upload the file. The judgment
Leeching principles : Check the data sent by HTTP intercepted by httpwatch.
GET/IMG. ashx? Img1_svn_work.gif HTTP/1.1
Accept :*/*
Referer: http://www.svnhost.cn/
Accept-language: ZH-CN
UA-CPU: x86
Accept-encoding: gzip, deflate
User-Agent: Mozilla/4.
The project was finally packaged and deployed last week. To sum up, there are some things for packaging ASP. NET websites.1. When the database is installed during packaging, it is restored through the database backup file, instead of creating a new
The effect is as follows:
This is a graph generated from the data in dataset.My dataset is the data read from the sendrec table, which has the following fields: ID, sendid (Order Number), sendtime (record time), and sendnum (sent per unit
Using system;
Using system. IO; public partial class _ default: system. Web. UI. Page
{
Protected void btnupload_click (Object sender, eventargs E)
{
If (ispostback)
{
Boolean fileok = false; // defines the variable to determine whether the file is
If a page contains a frame, it is divided into the left and right sides. The left side is named hello1.aspx,
The framework page on the right is hello2.aspx. If I operate hello1,
To ensure that hello2 is refreshed, the method is simple:
The
There are three authentication methods for Asp.net: "Windows | forms | passport", among which forms is the most used and most flexible.Forms authentication provides good support for user authentication and authorization. You can use a login page to
Summary
The term "provider" is used to study ASP. net2.0's friends are familiar with ASP. new features such as net2.0 membership (membership management), sitemappath (site map), and personalization are built based on the provider model. For this
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.