After clicking a button in ASPX page I have to execute a URL
http://127.0.0.1/phptest/sendmail.php?id=+@USERNAME
using VB.net. @USERNAME
comes from textbox.
After clicking a button in ASPX page I have to execute a URL
http://127.0.0.1/phptest/sendmail.php?id=+@USERNAME
using VB.net. @USERNAME
comes from textbox.
Make an HTTP request if you need to call a URL from VBScript:
username = ...
url = "http://127.0.0.1/phptest/sendmail.php?id=+@" & username
Set req = CreateObject("Msxml2.XMLHttp.6.0")
req.open "GET", url, False
req.send
If req.status = 200 Then
'request successful
Else
'request failed
End If
Try something like that in vbscript :
Dim URL,ws,USERNAME
USERNAME = InputBox("Type your USERNAME","USERNAME","USERNAME")
URL = "http://127.0.0.1/phptest/sendmail.php?id=+@"& USERNAME &""
set ws = CreateObject("wscript.shell")
ws.run URL