p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Forms
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 1st, 2003, 09:37 PM
Registered User
Points: 4, Level: 1
Points: 4, Level: 1 Points: 4, Level: 1 Points: 4, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to properly display data from a post

A question on basic usage for a learner.

So far I've discovered you can display user data posted to a form in one of two ways. The book (ASP 3.0) says to use a dim and display that...

<%@ Language=VBScript %>
dim strData
strData = Request.Form("data")
<HTML>
<BODY>
<%=strData%>
</BODY>
</HTML>

...but requesting the data directly from the form seems to work just as well...

<%@ Language=VBScript %>
<HTML>
<BODY>
<%Response.Write Request.Form("data")%>
</BODY>
</HTML>

The second way seems cleaner but I haven't seen this as an example in the book. (I'm only at page 113.)

Is there a reason for this? Is it 'bad form'?

TIA,
Mike

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #2 (permalink)  
Old August 5th, 2003, 02:27 PM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I really dont see why you 'should' and 'shouldnot' do in either ways, but the first one has its own advantages, like for a scenario where you are passing the same value through multiple forms(that is from the page where the form value is written to another page)or anything specific where you want to use/refer a variable, probably storing the value in a variable would be a good approach, other than that i think its a waste creating a varible for the sole purpose of displaying it!!!


Chintu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
 


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid does SORT integer data properly chayanvinayak Flash (all versions) 3 July 27th, 2006 03:59 PM
Submitting POST data without a form takabyte Classic ASP Basics 9 November 1st, 2004 12:49 AM
Using XMLHTTP to POST form data channer Classic ASP XML 8 January 6th, 2004 05:44 AM
Ch05 IE not properly display XML david_4092 BOOK: Beginning ASP.NET 1.0 1 October 24th, 2003 02:23 PM
Display message between post to asp wlangel Classic ASP Basics 1 September 8th, 2003 05:34 PM



All times are GMT -4. The time now is 08:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc