Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1010 B

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <HTML>
  3. <HEAD>
  4. <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
  5. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  6. <TITLE>MSMQ Asp Sample Send Message Page</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <A HREF="Default.asp">[Back]</A>
  10. <% Set msg=CreateObject ( "MSMQ.MSMQMessage" )
  11. if Not msg Is Nothing Then
  12. msg.Label = "ASP Test Message"
  13. msg.body = CStr ( Request.QueryString ( "SendMsgText" ))
  14. set q=Session ( "SendQueue" )
  15. on error resume next
  16. msg.Send q, false
  17. if err.number <> 0 then %>
  18. <br><br><H3>Error sending message:
  19. <% response.write "<br><br><font color=""#FF0000"">Error</font> 0x" & Hex(Err.Number) & " - " & Err.Description & "<br>"
  20. else %>
  21. <H3>Sending Message ( body ):<HR> <%= Request.QueryString ( "SendMsgText" )%>
  22. <HR>to Queue <%= Session ("mname") & "\" & Session ("qname")%></H1>
  23. <% response.write "Message sent.<br>"
  24. end if
  25. else
  26. %>
  27. Error creating Message Object
  28. <% End if %>
  29. </BODY>
  30. </HTML>