I want to create a batch script to automatic login aspx page, how to do it ?
this is my script code:
@echo off
REM Set variables
set "url=http://abctest.aspx"
set "username=test
set "password=pass"
REM Send POST request to login
curl -d "username=%username%&password=%password%" -X POST %url% -o response.html
REM Display the response
type response.html
but it is not work ..
By default, the click handlers are invoked by ASP.Net (they depend on ViewState), and cannot be called externally unless changes are made to the code.
If you can modify the code within abctest.aspx, then it can be done by handling the POST. A rough example pasted below: