Form Posting?

A

Adam Knight

Hi all,

I have a form that i want to benefit from aspx functionality (ie: viewstate,
validation).
However for the posting of the form, i want to simply transfer execution to
another script.

Server.Transfer("myScript.aspx")

Because i am using .net i can't use the action attribute (it appears) in a
form and simply post that form by
clicking a submit. Instead .net appears to require issuing a post back.

This said, it seems a little strange to have an onClick Server event issuing
the Server.Transfer.
It would add another page request wouldn't it. First the post back.. then
the transfer?

Am i missing something here?

Adam
 
P

Patirck Ige

Adam sorry i didn't reply to your post then..
I reside in Melbourne and you.
Patrick
 
S

Scott Allen

No, a Response.Redirect would make another round trip to the client
and back. A Server.Transfer stays on the server side. One drawback is
that the client's browser won't know about the transfer and will still
think the current web form is the URL it posted to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top