473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Form Posting?

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

Nov 19 '05 #1
3 1022
Adam sorry i didn't reply to your post then..
I reside in Melbourne and you.
Patrick
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:Ob**************@TK2MSFTNGP09.phx.gbl...
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

Nov 19 '05 #2
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 5 Oct 2005 12:11:28 +1000, "Adam Knight"
<ad**@pertrain.com.au> wrote:
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


Nov 19 '05 #3
Sunshine Coast...QLD.

"Patirck Ige" <na********@hotmail.com> wrote in message
news:uV*************@TK2MSFTNGP15.phx.gbl...
Adam sorry i didn't reply to your post then..
I reside in Melbourne and you.
Patrick
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:Ob**************@TK2MSFTNGP09.phx.gbl...
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


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: DaveFash | last post by:
Posting variables from an HTML FORM, via the Request.Form function on the receiving ASP page is great. But how can you POST a Form variable to an ASP page -- without a human pushing a Submit...
2
by: David N | last post by:
Hi All, The OnLoad() event is invoked automatically when a form is being loaded. Do we have another event that is invoked automatically after a form has completed loading? Thanks.
5
by: Ron Vecchi | last post by:
I know the math I need to perform on width and height to keep an aspect ratio but where and how would I implement keeping a set aspect ratio on a form when a user resizes it. Override OnResize?...
8
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender,...
2
by: Jeff Baker | last post by:
How does one post to an ASPX page using the WebClient when the form name is required?
13
by: Ian.Suttle | last post by:
I am have been researching this issue to no end, so any help would be very much appreciated. I have a page with form tags. Inside of the form tags is a panel that contains a user control. The...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
22
by: Woody Splawn | last post by:
I am somewhat new to VS.net in general. As a result I am prone to make mistakes. When adding some new feature to a a form it would be nice if I could back it up before trying something that might...
4
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.