Ciao! Grazie per la risposta!
Ho trovato questo articolo http://msdn.microsoft.com/it-it/library/debx8sh9%28v=vs.80%29.aspx che mi sembra dovrebbe fare quello che voglio... salvo il fatto che non capisco proprio come usarlo all'interno di un altro script ASP.net.
La mia pagina aspx comincia e finisce cosi':
<%@ Page Language="vb" Debug="true" %>
<script language="vb" runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
...
End Sub
Come uso/inserisco il codice che ho trovato?
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
' Create a request using a URL that can receive a post.
Dim request As WebRequest = WebRequest.Create("http://www.contoso.com/PostAccepter.aspx ")
' Set the Method property of the request to POST.
request.Method = "POST"
' Create POST data and convert it to a byte array.
Dim postData As String = "This is a test that posts this string to a Web server."
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
' Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded"
' Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length
' Get the request stream.
Dim dataStream As Stream = request.GetRequestStream()
' Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
' Close the Stream object.
dataStream.Close()
End Sub
End Class
End Namespace
Lumi?!! O.O