AJAX xmlhttprequest + viewstate

Hello everyone!

I have a problem I have run into recently writing a widget.

Basically, it is just to monitor internet usage, so it gets the upload and download values from a members webpage.

I can request the login page and get what I need from it, which includes fields like username and password, but there is a hidden viewstate field.

I can get the viewstate value easily enough with a regex, but when I post all the values back to the same page I get a runtime error.

I was wondering if anyone has had experience with logging into aspx pages that postback to themselves and have a viewstate hidden field.

I can’t see the exact error cause, because it isn’t a webpage I control and they have remote error messages turned off.

Thanks for any help you can give!