>I am working on a ASP.NET application where the user needs to be logged into a completely separate Internet application outside the company. Apparently, the separate application requires you to fill in a hidden form with username, password, etc., then POST to their login page.
>
>I have never done anything like this before, so I'm unsure how to do it. Can you create a hidden form within your ASP.NET page, then use JavaScript to post the form? Is there a better way?
Yes, this is a simple process. You would do it as if you would do it in a HTML page. When you build a HTML page having a form, there is no need to have absolutely visible fields. You can have hidden fields only, which could serve for such a purpose. So, once the form is defined with a form name, you can gain access to it by the use of javascript, for example. So, you can have something like this in the page:
<SCRIPT>
function PostForm(tcUsername,tcPassword)
{
document.Login.Username.value=tcUsername
document.Login.Password.value=tcPassword
document.Login.submit()
}
</SCRIPT>
This would assume the page you access has a form named Login. Otherwise, simply adjust it to the proper name. Then, to call it, simply do the proper code in your ASP.NET page to execute a javascript function such as:
javascript:PostForm("MyUsername","MyPassword")
This does not do entirely what you need but it should provide you a basic idea of the functionality you need to implement. Based on what you said, you would probably do something like this in the background in order to have it properly authenticated.