By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,769 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,769 IT Pros & Developers. It's quick & easy.

automatic form submission

P: n/a
Hi,
I am creating a site where I need to refer to another external file
(aspx).
I create the form and works fine. But as soon as I try to submit the
form automatically (with form.submit()) I get an error from the
external site. I do not have the code of that site but suppose that my
automatic submission does not pass all of the variables. This is how
it looks in plain html:

<form name="Login" method="post"
action="http://ims.ukro.ac.uk/UKRO/login.aspx" id="Login">

<input type="hidden" name="__EVENTTARGET" value="LoginCommand" />

<input type="hidden" name="__VIEWSTATE"
value="dDwtODMyMTc4OTc4O3Q8O2w8aTwwPjtpPDE+Oz47bDx 0PHA8bDxUZXh0Oz47bDxMb2dpbjs+Pjs7Pjt0PDtsPGk8MT47a TwzPjs+O2w8dDw7bDxpPDE+Oz47bDx0PHA8bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3M9J2NvcnBvcmF0ZUh5cGVyTGlua1NlcGFyY XRvcidcPiBcPiBcPC9zcGFuXD5cPGJcPlw8Zm9udCBmYWNlPUF yaWFsIHNpemU9MyBjb2xvcj0jMDAwMDAwXD5JTVMgTG9naW5cP C9mb250XD5cPC9iXD47Pj47Oz47Pj47dDw7bDxpPDA+Oz47bDx 0PDtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O
k8Mz47aTw1PjtpPDY+O2k8OT47aTwxMD47PjtsPHQ8cDxwPGw8 VGV4dDs+O2w8VXNlciBuYW1lOjs+Pjs+Ozs+O3Q8cDxwPGw8VG V4dDs+O2w8UGFzc3dvcmQ6Oz4+Oz47Oz47dDxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs+Pjs+Ozs+O3Q8cDxsPHZhbHVlOz47bDxSZX NldDs+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEZvcmdvdCB5b3Vy IHBhc3N3b3JkPzs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdGVVcm w7VGV4dDs+O2w8aHR0cDovL2ltcy51a3JvLmFjLnVrL1VLUk8v Rm9yZ290UGFzc3dvcmQuYXNweD9Vc2VyUHJlZj1jdWx0dXJlJT
FZW4tR0I7Y2xpY2sgaGVyZTs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz4+O z4+Oz4+Oz6uA2VLC+u3KZvM2xD7WM8FhSqygw=="
/>

<input name="LoginForm1:UserName" type="hidden" maxlength="50"
id="LoginForm1_UserName" value="username" style="width:150px;" />

<input name="LoginForm1:Password" type="hidden" maxlength="50"
id="LoginForm1_Password" value="password" style="width:150px;" />

<input name="Submit" type="hidden" maxlength="50"
id="LoginForm1_LoginCommand" value="LoginForm1:LoginCommand" />

<input type="Submit" name="LoginForm1:LoginCommand" value="GO"
id="LoginForm1_LoginCommand" />
</form>
And now I realised thet sometimes it doesn't even work with manual
submission but sometimes does.

Do you have any suggestions?
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Piotr Kurpiel wrote:
Hi,
I am creating a site where I need to refer to another external file
(aspx).
I create the form and works fine. But as soon as I try to submit the
form automatically (with form.submit()) I get an error from the
external site. I do not have the code of that site but suppose that my
automatic submission does not pass all of the variables. This is how
it looks in plain html:

<form name="Login" method="post"
action="http://ims.ukro.ac.uk/UKRO/login.aspx" id="Login">

<input type="hidden" name="__EVENTTARGET" value="LoginCommand" />

<input type="hidden" name="__VIEWSTATE"
value="dDwtODMyMTc4OTc4O3Q8O2w8aTwwPjtpPDE+Oz47bDx 0PHA8bDxUZXh0Oz47bDxMb2dpbjs+Pjs7Pjt0PDtsPGk8MT47a TwzPjs+O2w8dDw7bDxpPDE+Oz47bDx0PHA8bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3M9J2NvcnBvcmF0ZUh5cGVyTGlua1NlcGFyY XRvcidcPiBcPiBcPC9zcGFuXD5cPGJcPlw8Zm9udCBmYWNlPUF yaWFsIHNpemU9MyBjb2xvcj0jMDAwMDAwXD5JTVMgTG9naW5cP C9mb250XD5cPC9iXD47Pj47Oz47Pj47dDw7bDxpPDA+Oz47bDx 0PDtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O k8Mz47aTw1PjtpPDY+O2k8OT47aTwxMD47PjtsPHQ8cDxwPGw8 VGV4dDs+O2w8VXNlciBuYW1lOjs+Pjs+Ozs+O3Q8cDxwPGw8VG V4dDs+O2w8UGFzc3dvcmQ6Oz4+Oz47Oz47dDxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs+Pjs+Ozs+O3Q8cDxsPHZhbHVlOz47bDxSZX NldDs+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEZvcmdvdCB5b3Vy IHBhc3N3b3JkPzs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdGVVcm w7VGV4dDs+O2w8aHR0cDovL2ltcy51a3JvLmFjLnVrL1VLUk8v Rm9yZ290UGFzc3dvcmQuYXNweD9Vc2VyUHJlZj1jdWx0dXJlJT FZW4tR0I7Y2xpY2sgaGVyZTs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz4+O z4+Oz4+Oz6uA2VLC+u3KZvM2xD7WM8FhSqygw==" />

<input name="LoginForm1:UserName" type="hidden" maxlength="50"
id="LoginForm1_UserName" value="username" style="width:150px;" />

<input name="LoginForm1:Password" type="hidden" maxlength="50"
id="LoginForm1_Password" value="password" style="width:150px;" />

<input name="Submit" type="hidden" maxlength="50"
id="LoginForm1_LoginCommand" value="LoginForm1:LoginCommand" />

<input type="Submit" name="LoginForm1:LoginCommand" value="GO"
id="LoginForm1_LoginCommand" />
</form>
And now I realised thet sometimes it doesn't even work with manual
submission but sometimes does.

Do you have any suggestions?

Hi,

I strongly suspect that that other server EXPECTS you to have some state, eg
in a session, or by passing that monstrous __VIEWSTATE content.
Go study the setup would be my advise.

Hard to say how to fix it with the given information.

Regards,
Erwin Moller
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.