This article is mainly for you to introduce the use of ASP. NET MVC engine development of plug-in system of relevant information, with a certain reference value, interested in small partners can refer to
First, preface
The plug-in system in my mind should be like NOP (more awesome like orchard,osgi. NET), each plug-in module is not just a bunch of DLLs that implement a business interface, and then invoked using reflection or IOC technology, but a com
Function
Openconn (conn)
'
Open Database Connection
Dim
Connstr
If
Issql
=
1
Then
'
For SQL Server databases
'
SQL Server database connection parameters: User Name, user password, database name, connection name (local, IP address used in other places)
Dim
Sqlusername, sqlpassword, sqldatabasename, sqllocalnameSqlusername
=
"
SA"
Sqlpassword
=
"
"
Sqldatabasename
=
"
Northwind"
Sqllocalname
Problem presentation:
The process account used to run ASP. NET must have read access to the IIS metabase (for example, IIS: // servername/W3SVC.
Cause analysis:This problem occurs mostly because IIS is installed after. NET Framework is installed.
Solution:Start->Program-> Microsoft. NET Framework SDK V2.0-> SDK Command PromptInputAspnet_regiis-I press ENTER
Next, you may encounter another problem: fai
"subloginstatus" runat="server " Methodname="getloginstatus"/>Add a function to the background CS file Getloginstatus Public Static stringGetloginstatus (HttpContext context) {if(Context. session["usr"] !=NULL) { returnContext. session["usr"]. ToString () +"Welcome to your login"; } Else { return ""Sign in " "register""; }}This way the rest of the page is cached, and only the login state is dynamically read every time.Note: Because a part of the page is dynamic, the status
The following is a conversion:
Typical three-tier structure example source code (data layer, business layer, presentation layer)Data Layer:Data Layer:Using System;Using System. Collections;Using System. Data;Using System. Data. SqlClient;
Namespace YiPu. WebModules. Accounts. Data{///
/// Summary of the User.///Public class User: YiPu. WebModules. Data. DbObject{Public User (string newConnectionString): base (newConnectionString){}
Public bool Cre
fixed digits in ASP. 0-Padded function (Resolved, example)!In development, the number implementation 8 digits, but the need to use 0 to complement. such as: 123, indicating: 0000123.Examples are as follows: Decimal AAA = 123; Numeric string bbb = AAA. ToString (); Convert to character BBB = bbb. PadLeft (7, ' 0 '); Total 7 bits, before with 0 Response.Write (BBB);Decimal AAA = 12
One, Err object
The Err object does not need to create an instance when used, which means that you use it as a session.
The Set Conn=server.createobject ("ADODB") does not need to be used like a ADODB object. Connection ") to create an instance that returns an error code.However, Err!=err.number can be cleared with the clear method for the next use. It is mainly a description method, which returns a brief error description, here is a classic example
This article mainly introduces the ASP.net implementation of forms authentication based on the WebService application, example analysis of the use of forms for WebService identity authentication of the relevant skills and implementation methods, the need for friends can refer to the
In asp.net programs where security requirements are not very high, forms based authentication is a common way to use, and if you need to authenticate webservice, the most
excel|odbc| data flutter and 8/30/2001 4:52:49 PM add in Joy asp← return suites:
Example:
There is an Excel table book1.xsl in "C:\excel\book1.xls", and the table is structured as follows:
1 Ordinal name Amount
2 1 Sheets 3,100
3 2 Lee 4,200
4 3 King 5,300
The ordinal field is not empty
Note: The Excel start line is 1 instead of 0
Set xlapp = server. CreateObject ("Excel.Application")
strsource = "C:\ex
Function
Have you ever encountered the need to take a string of some values and not to start? Do you feel that reading or teaching material is confused with the writing of split ... If you have this question, please see below my explanation to the example, I believe you will have a certain understanding of this.Let me introduce the use of the split function:Array of return values = Split ("string", "separator")Suppose the variable strurl holds the URL
In many Web applications, we encounter a lot of places where we need to dynamically insert multiple rows of records. For example, on the talent website, when we fill in the resume, we have to fill in our project experience, we can according to their actual situation dynamically add the number of, this is not a separate page to add, this dynamic add is on the same page dynamically added, and finally submitted to the server together to save to the datab
The method of using split to implement array operation under ASP
An example of Split function in ASP
Have you ever encountered the need to take a string of some values and not to start? Do you feel that reading or teaching material is confused with the writing of split ... If you have this question, please see below my explanation to the
use simple stored procedures. Let's look at a slightly more complex stored procedure to learn more about the application of the stored procedure.
third, the actual application of the stored procedure
User login in the ASP project is often used, I believe many friends have done similar systems, but the use of stored procedures to do the validation of friends may not be many, then we do it as an example,
The ASP shortname and ShortPath properties are those that take the short name or path of the file
The ShortPath property is used to return the file or folder specified by the short path (8.3 naming convention).
GrammarFileobject.shortpathFolderobject.shortpath
For example, a file object
Dim fs,fSet Fs=server.createobject ("Scripting.FileSystemObject")Set F=FS. GetFile ("C:asp_test_webhitcounterfile.txt"
ASP FSO IsRootFolder and Fiilesystemobject Drive properties Let's take a look at the FSO Dirve attribute usage.
The drive uses the property restitution drive in the specified file or folder.
GrammarFileobject.driveFolderobject.drive
For example, a file object
Dim fs,fSet Fs=server.createobject ("Scripting.FileSystemObject")Set F=FS. GetFile ("C:test.txt")Response.Write ("File resides on drive:")Response
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.