%@ LANGUAGE="VBSCRIPT" %>
MSMQ Asp Sample Send Message Page
[Back]
<% Set msg=CreateObject ( "MSMQ.MSMQMessage" )
if Not msg Is Nothing Then
msg.Label = "ASP Test Message"
msg.body = CStr ( Request.QueryString ( "SendMsgText" ))
set q=Session ( "SendQueue" )
on error resume next
msg.Send q, false
if err.number <> 0 then %>
Error sending message:
<% response.write "
Error 0x" & Hex(Err.Number) & " - " & Err.Description & "
"
else %>
Sending Message ( body ):
<%= Request.QueryString ( "SendMsgText" )%>
to Queue <%= Session ("mname") & "\" & Session ("qname")%>
<% response.write "Message sent.
"
end if
else
%>
Error creating Message Object
<% End if %>