Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior on aspx Web form
Message
From
12/05/2006 00:00:29
 
 
To
11/05/2006 23:56:27
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01120908
Message ID:
01121215
Views:
8
>Action attribute of ASP.NET form with runat="server" is ignored and the page always posts back to itself, right? That's the ASP.NET post model. If you want to go somewhere else, you could probably check in the form load to see if you're in a postback and use Server.Transfer or Response.Redirect to send the hit somewhere else. However, the form vars being posted don't necessarily go along for the ride, at least in earlier versions of ASP.NET unless you set a second param on Server.Transfer to true or do other context-related tricks.
>
>If you already knew all of that and just wanted to know why ASP.NET changed the action in the source to the page that was posted from, I'm guessing that it's because action different from the page itself is ignored.
>
>If you are using ASP.NET 2.0, it looks like you can use the new PostBackUrl attribute on the asp:button object to send the post somewhere else, which sounds like a big improvement over the previous model. Details here: http://msdn.microsoft.com/msdnmag/issues/05/10/ExtremeASPNET/
>
>I am just starting to learn more about all of this, so I'm probably missing some important info, but maybe this will point you in the right direction.

Yes, correct, I figured it out during the last day. It was one last step to do in my framework conversion and finally completed it. Now, I only have a few little things here and there to adjust and verify. After all, the postback approach is what I need. It is a more structured model and it knows about the value of all the fields, assuming we validate to false and have to advise the user that the save didn't work.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform