Showing posts with label ASP. Show all posts
Showing posts with label ASP. Show all posts
0

Code for obtaining ASPX (ASP.NET) variables value

Wednesday, November 7, 2007

You can use the following code for obtaining the value of the ASPX variables.
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" ValidateRequest="fal
se" %>


Testing ASP.NET Page






0

ASP - MySQL Connector/ODBC

<%
'==============================================
' Test mySQL connection
' This test can be used on .NET 1.1 and 2.0
' This test uses the MySQL Connector/ODBC 3.51
' Testing only the connection to the database
'==============================================

'Dim the variables
Dim sConnection, objConn, database, username, password

'SET THE VARIABLES HERE
database = ""
username = ""
password = ""



'create the connection object
Set objConn = Server.CreateObject("ADODB.Connection")

'connection string
sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE="+ database +"; UID="+
username +";PASSWORD="+ password +"; OPTION=3"

'open the connection
objConn.Open(sConnection)

'
'this is where you would see the code to do stuff with the database
'

'close the connection and kill the object
objConn.Close
Set objConn = Nothing
%>

mySQL Connection



Test MySQL Connection
If you do not see any errors then the connection was successful


0

ASP Script Time Out error

You can increase the time that is allowed to process ASP scripts for a particular Web site. To do
this, change the metabase value in Internet Information Server (IIS):
1. Open Internet Services Manager. (inetmgr)
2. Expand the tree and right-click Default Web Site (or the site that has the problem).
3. Click Properties.
4. Click the Home Directory tab.
5. Under Application Settings, click Configuration.
6. Click the App Options tab.
7. Increase the ASP Script Timeout value to a number high enough to prevent script timeouts.