Suntower
Posts: 225
|
Posted: 12/16/2004, 11:43 AM |
|
Just started using ASP. One frustration is trying to figure out -where- to insert code snippets.
For example, I want to be able to call an update page from either of two grid pages. I want the update page to return to the proper calling page.
I realised that I could do this by adding a parameter to each calling page and then editing the redirect variable in the update page on submit based on the received parameter. Works great. Took 3 minutes.
But of course that blows the generated code. which I do -not- want to do.
However, I spent about 1/2 hour trying to find the proper events to insert code snippets into to achieve the same results.
There has to be a faster way than simple trial and error, right?
Suggestions?
_________________
---On a campaign for more examples and better docs! |
|
|
peterr
Posts: 5971
|
Posted: 12/16/2004, 2:45 PM |
|
Hi,
I don't think that there is a faster way than experience, testing, trial/error, and possibly reviewing the code. Out of millions of possibilities of various custom functionality that users may implement, I think that every one of them would need to be decided on individual basis. However in most cases it should be much easier to decide that, for example, you may want to send an email after a form is submitted (and record inserted), not after the page is opened. So the "After Insert" event would be obvious here.
Though I hope that you won't get stuck too often looking for the right event (unless you need million features in your Web application ), and once you figure something out then you can reuse the same approach.
As for redirecting a page back to the calling page, you can try modifying the Redirect variable as shown at http://docs.codecharge.com/studio/html/QuickStart/Creat...rInitEvent.html and in "Multi-Step User Registration" example.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|