| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To |
| ISAPI tutorial for Delphi developers | |||||||||||||||
| Page 7: Responding to a request | |||||||||||||||
We can now retrieve information that the client send us via the web-browser, but how do we respond to the requests? From the examples in the previous chapters we have seen two ways to do this:
1. Setting the value of the Response.Content property.
2. Using the Response.SendRedirect method.
Note: In Delphi 5, the WebAction has a new property called the Producer. You can respond to a request by specifying a Producer in the property. However, I will not mention this anymore until we have seen the TPageProducer chapter.
SendRedirect This site has been moved. You will be re-directed to the new location in a few seconds........
This can actually be done in several ways. One way is to put a HTML meta-tag in the index page that does a re-direct. Some servers allow you to setup a site as a re-direction. For example in IIS you can create a new web-site that all it does is re-direct to another site.
Well, Response.SendRedirect can be viewed as something similar to the above. All it does is respond to the request by re-directing the client to a new URI. Take a look at the first example of this chapter (chapter7a.dpr). This has only one action which is also the default. It retrieves the value sent my the Query and re-directs you to the new location.
Response.SendRedirect(Request.QueryFields.Values['location']);
That's all you need to know to be able to use SendRedirect. In later examples I will make use of this feature alot.
Content Next page > TPageProducers > Page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
|||||||||||||||
All graphics (if any) in this feature created by Zarko Gajic.
| More Delphi |
|
· Learn another routine every day - RTL Quick Reference. · Download free source code applications and components. · Talk about Delphi Programming, real time. · Link to the Delphi Programming site from your Web pages. · Tutorials, articles, tech. tips by date: 2001|2000|1999|1998 or by TOPIC. |
|
· NEXT ARTICLE:
ADO Cursors - DB/10. Chapter ten of the free Delphi Database Course for beginners. How ADO uses cursors as a storage and access mechanism, and what you should do to choose the best cursor for your Delphi ADO application. |
| Stay informed with all new and interesting things about Delphi (for free). |
|
|
| Got some code to share? Got a question? Need some help? |

