A VALUE attribute, if supplied, specifies the initial contents of the textfield.
When the form is submitted, the current contents are sent; these
can reflect user input. If the textfield is empty when the form is submit213
A VALUE attribute, if supplied, specifies the initial contents of the textfield.
When the form is submitted, the current contents are sent; these
can reflect user input. If the textfield is empty when the form is submit213
Posted by Thanh Thanh Friday, April 24, 2009 at 11:52 AM
The NAME attribute identifies the textfield when the form is submitted.
In standard HTML the attribute is required. Because data is always sent
to the server in the form of name/value pairs, no data is sent from form
controls that have no NAME.
Posted by Thanh Thanh at 11:38 AM
The METHOD attribute specifies how the data will be transmitted to the
HTTP server. When GET is used, the data is appended to the end of
the designated URL after a question mark. For an example, see Section
16.1 (How HTML Forms Transmit Data). GET is the default and is
also the method that is used when a browser requests a normal URL.
When POST is used, the data is sent on a separate line.
The advantages of using the GET method are twofold: the method is
simple; and with servlets that use GET, users can access those servlets
for testing and debugging without creating a form, simply by entering
a URL with the proper data appended. On the other hand, due to
URL size restrictions on some browsers, GET requests have limits on
the amount of data that can be appended, whereas POST requests do
not. Another disadvantage of GET is that most browsers show the URL,
including the attached data string, in an address field at the top of the
browser. This display makes GET inappropriate for sending sensitive
data if your computer is in a relatively public place.
Posted by Thanh Thanh at 11:33 AM
Each of these elements is typically given a name and has a
value based on the original HTML or user input. When the form is submitted,
the names and values of all active elements are collected into a string
with = between each name and value and with & between each name/value
pair. This string is then transmitted to the URL designated by the FORM element.
The string is either appended to the URL after a question mark or sent
on a separate line after the HTTP request headers and a blank line, depending
on whether GET or POST is used as the submission method. This section
covers the FORM element itself, used primarily to designate the URL and to
choose the submission method. The following sections cover the various user
interface controls that can be used within forms.
Posted by Thanh Thanh at 11:29 AM
you can build a personal website! Homestead offers several types of inexpensive you can build an ebusiness from scratch, make your personal website an online store or easily take your existing business online. Homestead provides everything you need, including online catalogs, shopping cart, real-time transaction processing, integration with eBay, custom shipping tables, support for instant PayPal payments and much more. And if you need real-time credit card processing, high-end inventory management or sophisticated supply chain communication, a Homestead Storefront can meet your needs. Simply put, with Homestead Storefront's unique package of ecommerce software and business web hosting, it's easier to make money online than ever before
Posted by Thanh Thanh Thursday, April 16, 2009 at 2:51 PM
Anyone can build a website in minutes! Even if you've never tried to make a website before, you'll find Homestead's design tools easy to use. And seasoned website builders, you'll love how powerful Homestead software is. It's straightforward, intuitive, yet powerful: the perfect combination! Homestead's free website building software gives you everything you need to create a website yourself; no programming or HTML skills are needed! Best of all, everything you need to create your own website is included in every Homestead website package for free! Web hosting is also available, and check out some of the designs created using our softwar
Posted by Thanh Thanh at 2:49 PM
* a session starts when:
* A new user requests an ASP file, and the Global.asa file includes a Session_OnStart procedure
* A value is stored in a Session variable
* A user requests an ASP file, and the Global.asa file uses the tag to instantiate an object with session scope
Posted by Thanh Thanh at 2:47 PM
When you are working with an application, you open it, do some changes and then you close it. This is much like a Session. The computer knows who you are. It knows when you start the application and when you end. But on the internet there is one problem: the web server does not know who you are and what you do because the HTTP address doesn't maintain state.
ASP solves this problem by creating a unique cookie for each user. The cookie is sent to the client and it contains information that identifies the user. This interface is called the Session object.
The Session object is used to store information about, or change settings for a user session. Variables stored in the Session object hold information about one single user, and are available to all pages in one application. Common information stored in session variables are name, id, and preferences. The server creates a new Session object for each new user and destroys the Session object when the session expires.
Posted by Thanh Thanh at 2:46 PM
If your application deals with browsers that do not support cookies, you will have to use other methods to pass information from one page to another in your application. There are two ways of doing this
Posted by Thanh Thanh at 2:46 PM
cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.
Posted by Thanh Thanh at 2:45 PM
User input should be validated on the browser whenever possible (by client scripts). Browser validation is faster and you reduce the server load.
You should consider using server validation if the user input will be inserted into a database. A good way to validate a form on the server is to post the form to itself, instead of jumping to a different page. The user will then get the error messages on the same page as the form. This makes it easier to discover the error.
Posted by Thanh Thanh at 2:43 PM
An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use.
Posted by Thanh Thanh at 2:43 PM
You cannot view the ASP source code by selecting "View source" in a browser, you will only see the output from the ASP file, which is plain HTML. This is because the scripts are executed on the server before the result is sent back to the browser.
In our ASP tutorial, every example displays the hidden ASP source code. This will make it easier for you to understand how it works.
Posted by Thanh Thanh at 2:42 PM
he code inside the tags is executed on the server.
Response.Write is ASP code for writing something to the HTML output stream.
Now is a function returning the servers current date and time.
If you want to try it yourself, save the code in a file
Posted by Thanh Thanh at 2:33 PM
Fundamentally an ASP.NET page is just the same as an HTML page.
An HTML page has the extension .htm. If a browser requests an HTML page from the server, the server sends the page to the browser without any modifications.
An ASP.NET page has the extension .aspx. If a browser requests an ASP.NET page, the server processes any executable code in the page, before the result is sent back to the browser.
The ASP.NET page above does not contain any executable code, so nothing is executed. In the next examples we will add some executable code to the page to demonstrate the difference between static HTML pages and dynamic ASP pages.
Posted by Thanh Thanh at 2:30 PM
When a form is submitted in classic ASP, all form values are cleared. Suppose you have submitted a form with a lot of information and the server comes back with an error. You will have to go back to the form and correct the information. You click the back button, and what happens.......ALL form values are CLEARED, and you will have to start all over again! The site did not maintain your ViewState.
When a form is submitted in ASP .NET, the form reappears in the browser window together with all form values. How come? This is because ASP .NET maintains your ViewState. The ViewState indicates the status of the page when submitted to the server. The status is defined through a hidden field placed on each page with a control. The source could look something like this:
Posted by Thanh Thanh at 2:29 PM
ASP.NET 3.0 is not a new version of ASP.NET. It's just the name for a new ASP.NET 2.0 framework library with support for Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation; and Windows CardSpace.
These topics are not covered in this tutorial.
Posted by Thanh Thanh at 2:29 PM
Programming languages:
* C# (Pronounced C sharp)
* Visual Basic (VB .NET)
* J# (Pronounced J sharp)
Server technologies and client technologies:
* ASP .NET (Active Server Pages)
* Windows Forms (Windows desktop solutions)
* Compact Framework (PDA / Mobile solutions)
Development environments:
* Visual Studio .NET (VS .NET)
* Visual Web Developer
This tutorial is about ASP.NET.
Posted by Thanh Thanh at 2:28 PM
The .NET Framework is the infrastructure for the Microsoft .NET platform.
The .NET Framework is an environment for building, deploying, and running Web applications and Web Services.
Microsoft's first server technology ASP (Active Server Pages), was a powerful and flexible "programming language". But it was too code oriented. It was not an application framework and not an enterprise development tool.
The Microsoft .NET Framework was developed to solve this problem.
Posted by Thanh Thanh at 2:28 PM
ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.
* ASP.NET is a Microsoft Technology
* ASP stands for Active Server Pages
* ASP.NET is a program that runs inside IIS
* IIS (Internet Information Services) is Microsoft's Internet server
* IIS comes as a free component with Windows servers
* IIS is also a part of Windows 2000 and XP Professional
Posted by Thanh Thanh at 2:27 PM
Microsoft's previous server side scripting technology ASP (Active Server Pages) is now often called classic ASP.
ASP 3.0 was the last version of the classic ASP.
To learn more about classic ASP, you can study
Posted by Thanh Thanh at 2:27 PM
User input should be validated on the browser whenever possible (by client scripts). Browser validation is faster and you reduce the server load.
You should consider using server validation if the user input will be inserted into a database. A good way to validate a form on the server is to post the form to itself, instead of jumping to a different page. The user will then get the error messages on the same page as the form. This makes it easier to discover the error.
Posted by Thanh Thanh Wednesday, April 15, 2009 at 12:37 PM
ASP (Active Server Pages) is a Microsoft scripting technology that allows insertion of server executable scripts in web pages. ASP is a powerful tool for making dynamic and interactive Web pages.
SQL (Structured Query Language) is an ANSI (American National Standards Institute) standard for accessing database systems. SQL statements are used to retrieve and update data in a database.
ADO (ActiveX Data Objects) is a Microsoft technology that provides data access to any kind of data store.
By mastering these subjects you will be able to develop and maintain dynamic and interactive web pages and also retrieve and update data from a database over the internet.
The ASP Developer Certificate proves fundamental knowledge of web development using ASP, SQL, and ADO.
Posted by Thanh Thanh at 12:37 PM
ASP Variables
--------------------------------------------------------------------------------
A variable is used to store information.
If the variable is declared outside a procedure it can be changed by any script in the ASP file. If the variable is declared inside a procedure, it is created and destroyed every time the procedure is executed.
--------------------------------------------------------------------------------
Examples
Declare a variable
Variables are used to store information. This example demonstrates how to declare a variable, assign a value to it, and use the value in a text.
Declare an array
Arrays are used to store a series of related data items. This example demonstrates how to declare an array that stores names.
Loop through the HTML headers
How to loop through the six headers in HTML.
Time-based greeting using VBScript
This example will display a different message to the user depending on the time on the server.
Time-based greeting using JavaScript
This example is the same as the one above, but the syntax is different.
--------------------------------------------------------------------------------
Lifetime of Variables
A variable declared outside a procedure can be accessed and changed by any script in the ASP file.
A variable declared inside a procedure is created and destroyed every time the procedure is executed. No scripts outside the procedure can access or change the variable.
To declare variables accessible to more than one ASP file, declare them as session variables or application variables.
Session Variables
Session variables are used to store information about ONE single user, and are available to all pages in one application. Typically information stored in session variables are name, id, and preferences.
Application Variables
Application variables are also available to all pages in one application. Application variables are used to store information about ALL users in a specific application.
Posted by Thanh Thanh at 12:31 PM
To display your data, do the following (remember to use the asp extension when naming your file)
he above code creates a connection to the database, opens the chucknorrisvictims.mdb, and selects all of the data from it. It then creates a loop that runs through the file, writing all of the data inside and inserting a page break in between each set of data. It continues looping until it reaches the end of the data file (EOF). Finally it closes the connection to the database. Here is a sample of what you would see (using theoretical data; I don't really have a list of Chuck Norris's victims. There is no database that could contain such a massive amount of data).
Posted by Thanh Thanh Monday, April 6, 2009 at 8:18 AM
Now that we have created a database connection, we can move on to creating a table recordset.
If we use our ChuckNorrisVictims database as an example, we can access a table in it using the following method. Let's say there is a table called Victims, holding a list of everyone Chuck Norris has brutalized yet allowed to live.
Posted by Thanh Thanh at 8:17 AM
Using our friend the ODBC database connection, you can connect to any database that is located on your network (providing of course that there is an ODBC connection to use).Connect to a Microsoft Access Database Using ODBC
So you want to connect to a Microsoft Access database? Well you can do that with ODBC. First, you must make sure to configure your ODBC connection on the same computer that holds your web site. In other words, if your web site is located on a remote server, your web host will need to be contacted to do this for you. If you are using Personal Web Server or Internet Information Server on a computer you have access to, the following will allow you to set up the connection yourself:
*
Double Click the ODBC icon (it should be located in your Control Panel).
*
Find the System DSN tab and click on it.
*
Click the Add button under the System DSN tab.
*
Click on the Microsoft Access Driver and click the Finish button.
*
When the next screen appears, click the Select button to locate your database.
*
Choose a DSN (Data Source Name).
*
Click the OK button.
Posted by Thanh Thanh at 8:11 AM
Before you can work with the data inside of a database you must first connect to a database. There several ways to do this:
How to Create a DSN-free Connection
Of the two ways to connect to a database, the DNS-free way is probably the easiest. It can be used to connect to any Microsoft Access database. For our example let's say you have a database named ChuckNorrisVictims.mdb that is located on a web directorTo connect to the ChuckNorrisVictims database
Posted by Thanh Thanh at 8:04 AM
ADO, as shown above stands for ActiveX Data Objects. They are a set of objects used to access data sources. It is a successor to RDO (Remote Data Objects) and DAO (Data Access Objects).
Before we begin learning ADO, I am going to assume a few things:
*
You know HTML
*
You are familiar with ASP
*
You know some SQL
You don't have to be a professor in those subjects, just have a working knowledge or a basic understanding of them.
Now that all of that is out of the way, let's learn how to work with this bad mama jama.
Posted by Thanh Thanh at 8:04 AM
There's hardly much ado about nothing if you're talking about ADO. It stands for ActiveX Data Objects. You use these objects to access data sources. Keep reading to learn how you can start using them effectively for some basic tasks.
So I was speaking to my two friends the other day, Don Pedro and Balthasar, and they were rambling on about something:
Don Pedro: Nay Pray thee come, or if thou wilt hold longer argument, do it in notes.
Balthasar: Note this before my notes: there's not a note of mine that's worth the noting.
Don Pedro: Why, these are very crotchets that he speaks -- note notes forsooth, and nothing!
Me: Uhh what?
Yeah those guys know how to party. And while they are all a part of the whole Ado scene, it isn't quite the one I am writing about here today.
In this tutorial, I will discussing the vainglorious usage of ADO or ActiveX Data Objects.
Posted by Thanh Thanh at 8:03 AM
After all that hard work setting up the connections, you probably want something a little light to do. Well, that's just what it is to connect to a MySQL database from ASP. It is very simple. Below is the code that does the job:
Posted by Thanh Thanh at 8:01 AM
The SQL above simply creates a table called guests, from which you will be retrieving data shortly. Also, please write down the user name and password that you create during the installation process; you will need it in the next section.
The next step is to set up a system DNS. Open up the control panel on your computer and then go to Administrative Tools->Data Sources (ODBC). A screen that looks like this should come up:
Click on the System DSN tab and then add the button. You should now see a window
Scroll down, select MySQL ODBC driver and click "Finish." You should now come to a window
What you need to fill in is the user name and password. If you have installed MySQL 5, your username will almost certainly be "root." As for the password, you will be the only one who knows what it is. Once your password and user name is filled in, you will be able to view a list of databases from the drop-down box. Select the userinfo database from there. Click OK until all the dialog boxes are closed.
Posted by Thanh Thanh at 7:59 AM
In this article I will show you how to use MySQL with ASP. It is often said that open source and commercial software are not the best of friends. But in this case you will see that there are exceptions.
Now install all of them and restart your computer to make sure that everything is properly set up. After you have finished setting up the MySQL database server and the client, create a new database, add the following SQL and run it.
NSERT INTO `guests` VALUES (1, 'Dennis Brown', 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.', '2008-07-31');
INSERT INTO `guests` VALUES (2, 'Xuros', 'sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.', '2008-07-31');
Posted by Thanh Thanh at 7:58 AM
- Using MySQL with ASP- ADO for the Beginner- ADO.NET 101: Data Rendering with a DataGrid ...- Introducing SoftArtisans OfficeWriter 3.0 En...- Getting Remote Files With ASP- The Real Basics of Functions in ASP- Enhancing Readability with ASP- Mimicking PHP's String Formatting Functions- Windows Server Hacks 12, 77, and 98- How to Sort a Multi-Dimensional Array- Developing an Information Management Tool wi...- What are Active Server Pages?- Getting Remote Pages with ASP- FTP’ing Files with ASP- Apply Single-Sign-On to Your Application
Posted by Thanh Thanh at 7:53 AM