This is probably a simple question but I have spent the last 2 hours on it and keep going down blind alleys.
I have an existing asp.net app which I wrote 2 years ago and I now need to add a page containing a form that invokes an external application using https. In my initial testing I got the basics to work using the following (slightly simplified ) code:
<form name="moduleForm" action="
https://www.securesite..."
method="post" enctype="multipart/form-data" target="_blank" >
<input type="hidden" name="username" value="P128">
<input type="hidden" name="password" value="xxx">
<input type="image" src="../Statements.gif" hspace="5" name="memberstatements" />
</form>
I now need to dynamically update the hidden variable "username" with the actual username, which I have stored in a Session variable. I've tried several things, converting the form to runat=server and creating a Page_Load, etc. but the code is getting messier and I keep bumping into gotchas. The latest is that forms post unto themselves (didn't remember that). There must be a simple way to update this one variable and then let the user click on the button to submit the form.
(Sorry but my brain is in Coldfusion mode and I just can't get it back to .Net!!)