Best Web Designs Of the World Forums  

Go Back   Best Web Designs Of the World Forums > PROGRAMMING FORUMS > ASP Forum

Reply
 
LinkBack Thread Tools Display Modes
Old 07-15-2008, 09:23 PM   #1 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 7
Default Expert problem converting an ASP function to ASP.Net function.This function

uses the Server.CreateObject? Function PostTo(Data, URL)
Dim objXMLHTTP, xml
On Error Resume Next
Set xml = Server.CreateObject("MSXML2.ServerXMLHTT...
xml.Open "POST", URL, False
xml.SetRequestHeader "Content-Type","application/x-www-form-u...
xml.Send Data
If xml.readyState <> 4 then
xml.waitForResponse 10
End If
If Err.Number = 0 AND http.Status = 200 then
PostTo = xml.responseText
Else
PostTo = "Failed"
End If
Set xml = Nothing
End function
Dim objXMLHTTP, xml, Err1

On Error Resume Next

set xml=Server.Server.CreateObject("MSXML2.S...

'set xml=Server.CreateObject("MSXML2.ServerXM...

xml.Open "POST", URL, False
xml.SetRequestHeader "Content-Type","application/x-www-form-u...
xml.Send Data

If xml.readyState <> 4 then
xml.waitForResponse 10
End If

MsgBox "Err.Number=" &Err.number

If Err.number <> 0 then
Err1 = Err.Description
MsgBox "Err.Description=" &Err1
End If

If Err.number = 0 AND http.Status = 200 then
PostTo = xml.responseText
Else
PostTo = "Failed"
End If

Set xml = Nothing
End function

The error is 424/object required. I've tried just about everything. Any suggestions?
A friend of Bill W is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 12:53 AM.


Powered by vBulletin® Version 3.8.0 Beta 2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.