Verify the rendered name of the hidden field in the emitted HTML. If that hidden field is in a user control then it's actual name and ID in the HTML will be more than just the ID you set in the control design (i.e. something like 'loginControl_hidMyHiddenField').
An alternative to posting directly to the ASP page would be to handle the postback normally in ASP.NET (yes, unfortunately it's an extra server round trip, but it might save you some headaches). Then construct the redirect URL pointing to the ASP page and do a regular server redirect to it. That way you can control the names of the fields sent to the ASP page.
IMPORTANT: Avoid changing the ASP page to use the names you see in the rendered markup. Those names are likely to change and most likely won't work if the user control is used on another page.
If you don't need code-behind access to the fields you are posting to the ASP page, you could write them out in literal HTML that ASP.NET won't modify (and thus the control names will not change). However, then you run the possible (though minimal) risk of having a second control with the same name. Be creative with the name and you'll mostly eliminate that problem.
-
Peter