Generate static page instance code in batches using Asp

Source: Internet
Author: User

  1. <! -- # Include file = "../conn. asp" -->
  2. <! -- # Include file = "../cls_main.asp" -->
  3. <Html>
  4. <Head>
  5. <Meta http-equiv = "Content-Language" content = "zh-cn">
  6. <Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
  7. <Title> ASP batch generate static pages </title>
  8. </Head>
  9. <Body>
  10. <%
  11. Dim sid, eid
  12. Sid = abs (request ("sid "))
  13. If sid = 0 then
  14. Sid = 0
  15. Else
  16. Sid = cint (request ("sid "))
  17. End if
  18. Eid = cint (request ("eid "))
  19. If eid = 0 then
  20. Eid = 500
  21. Else
  22. Eid = cint (request ("eid "))
  23. End if
  24. Dim tt, ResNum
  25. Set tt = New Cls_Main
  26. ResNum = CLng (tt. Execute ("select max (id) from table") (0 ))
  27. Set Mesky = Nothing
  28. %>
  29. <Table border = "0" width = "100%" id = "table1" cellspacing = "0" cellpadding = "0">
  30. <Form method = "POST" action = "? Action = html ">
  31. <Tr>
  32. <Td width = "9%"> start ID: </td>
  33. <Td width = "35%"> <input type = "text" name = "sid" size = "20" value = "<% = sid %>"> </td>
  34. <Td width = "8%"> end ID: </td>
  35. <Td width = "23%"> <input type = "text" name = "eid" size = "20" value = "<% = eid %>"> (maximum ID: <% = ResNum %>) </td>
  36. <Td width = "23%"> <input type = "submit" value = "submit" name = "B1"> </td>
  37. </Tr>
  38. </Form>
  39. <%
  40. If request ("action") = "html" then
  41. Response. Write "<tr> <td colspan = 5>" & vbNewLine
  42. Response. Write "<br>" & vbNewLine
  43. Response. Write "generating <font color = red> <B>" & eid & ". xml </B> </font> file ...... "& VbNewLine
  44. Response. Write "<br>" & vbNewLine
  45. Response. Write "</td> </tr> <td colspan = 5>" & vbNewLine
  46. Response. Flush
  47. If (eid-500)> ResNum Then
  48. Response. Write "Congratulations! "
  49. Response. Flush
  50. Else
  51. Creat (sid)
  52. Sid = sid 500
  53. Eid = eid 500
  54. Response. Write "<meta http-equiv =" "refresh" "content =" "10; url =? Action = html & sid = "& sid &" & eid = "& eid &" ">"
  55. End If
  56. End if
  57. Function creat (id)
  58. Response. Write "<IFRame name = tt frameborder = 0 width = 100% height = 30 scrolling = no src = http://www.xx.com/cls_create.asp? Startid = "& sid &" & endid = "& eid &"> </IFrame>"
  59. End Function
  60. %>
  61. </Td> </tr>
  62. </Table>
  63. </Body>
  64. </Html>

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.