FrontPage creates html/asp mixed pages Ⅱ

Source: Internet
Author: User
Tags include mixed numeric value
What's going to happen? FrontPage has added a string of </form > tags, so 4 separate forms have been created on the page. This is not what we need, for this example, let's forget to use FrontPage, okay? Oh no! Try the following code:

<%
Dim MyVar, Straction
MyVar = Request.QueryString ("MyVar")

If MyVar = "1" Then
straction = "Mypage1.asp"
ElseIf myvar = "2" Then
straction = "Mypage2.asp"
ElseIf myvar = "3" Then
straction = "Mypage3.asp"
Else
straction = "Mypage4.asp"
End If
%>

[<form name= "MyForm" action= "]<%=straction%>" [method= "POST"] >

' Form HTML here ...

[</form>]



Instead of writing the entire form tag, only a small piece of code is written to define the numeric value of the string variable and then merge it into a single form definition. Look! FrontPage is just right, customers can do it freely!

This technique can be applied to any kind of object on the page. Do not have to write a complete HTML code, only in the ASP code block to replace the different variables can be!

How to apply FrontPage to accelerate product development

Here are some things that are fully applied to FrontPage when developing ASP pages. Not long ago, I wanted to construct a inclusion file that would randomly display some books from the Amazon.com online bookstore, just like the following:



The job will include: Create a fixed-width table that incorporates a piece of code that selects a random heading from 15 different headings, displays a graph of the related graphics in Amazon, a graphic of the book title, and the name of the book, along with a URL link that resides in the location of the Web site. In the desired page, you can insert this small table, using the following code:<% #INCLUDE file= "Books.inc"%>.


Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.