Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 26th, 2010, 01:00 PM
Registered User
 
Join Date: Nov 2010
Location: near Manchester
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Question Request and Response properties?

i've just come across the first sentence in the book that i don't understand: in the "Introduction to asp .net page lifecycle" (location 7,950 in the kindle version) it says that during the start phase of a page's lifecycle it gets "access to properties like Request and Response that are used to interact with the page's environment" - I don't recognise those properties; properties of what? Maybe they have to do with the HTTP request and response? Maybe if I just read on it'll all become clear...
Reply With Quote
  #2 (permalink)  
Old November 26th, 2010, 01:08 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Simply type Me.Request (VB) or this.Request (C#) in the Code Behind of a Page and you'll see these properties. They provide you access to the current request or response, enabling you to access, say, a query string variable like this (C#)

string id = this.Request.QueryString.Get("Id");

Since this (or Me) is optional here, this works the same:

string id = Request.QueryString.Get("Id");

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
lornarmac (November 26th, 2010)
  #3 (permalink)  
Old November 26th, 2010, 02:00 PM
Registered User
 
Join Date: Nov 2010
Location: near Manchester
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Default http request?

thanks Imar, what I wasn't getting is what's meant by the "current response/request" I think it must be the HTTP request/response for the current page?
Reply With Quote
  #4 (permalink)  
Old November 26th, 2010, 02:09 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Yes, exactly.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML request and get response praveenkumar .NET Web Services 0 May 23rd, 2007 04:13 AM
Response.CacheControl Properties mat41 Classic ASP Basics 0 March 8th, 2005 10:59 PM
Request and Response from server in XML snarreddi XML 3 December 24th, 2004 07:20 AM
Request-response in Tomcat sherbir Servlets 0 September 4th, 2004 04:26 AM



All times are GMT -4. The time now is 10:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.