Solved

Convert this asp to aspx

Posted on 2007-12-05
4
2,154 Views
Last Modified: 2013-12-16
Just converting to the asp script below to make it works with .aspx.

if possible please convert them to ASP.Net and the Visual C#

Thank you very much
'default.asp, should be default.aspx after the conversion
<% 
ToUrl= "https://www.example.com"
Keyword= "DEMO" 
SubscriptionKey= "faf32341afafsa" 
MyUrl = ToUrl & "?Keyword=" & Keyword& "&SubscriptionKey=" & SubscriptionKey
 
 
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
xmlhttp.open "POST", MyUrl , false 
xmlhttp.send "" 
msg = xmlhttp.responseText 
response.write(MyUrl )
 
response.write(msg)
set xmlhttp = nothing 
 
 
%>

Open in new window

0
Comment
Question by:Mantemper
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Alpesh Patel
ID: 20412469
http://weblogs.asp.net/pleloup/archive/2004/01/22/61754.aspx

this is the solution how u can use your script with MSXML2.ServerXMLHTTP

thanx
0
 

Author Comment

by:Mantemper
ID: 20416674
I don't think .net use the MSXML2.
I am not so sure
they are using some kind of
WebRequest Class
 http://msdn2.microsoft.com/en-us/library/system.net.webrequest(VS.71).aspx
0
 
LVL 10

Accepted Solution

by:
Alpesh Patel earned 300 total points
ID: 20420627
ya if u want to use incode ASP.net page then u have to use HttpWebRequest which is equivalent class

http://msdn.microsoft.com/msdnmag/is...b/default.aspx

this is the link which can help u
0
 

Author Comment

by:Mantemper
ID: 20812192
I got it.

Thank you guys
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question