( 0-5 years ) Bsnl, Infosys, Tcs, IBM, HP are Hiring - Apply Here

SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




ASP.NET ASP.NET Interview Questions asked in various Interviews. Professionals are invited to share Answers for these ASP.NET Interview Questions. ASP.NET Interview Questions with answers, Experiences, Career Advices, Tips and more.

What is a Form collection

        

Reply
 
LinkBack Thread Tools Display Modes
Old 25-05-08, 01:17 AM   #1 (permalink)
Senior Member
 
Join Date: Apr 2008
Posts: 13,341
Thanks: 0
Thanked 26 Times in 26 Posts
Rep Power: 137 ShivaniX is a jewel in the rough ShivaniX is a jewel in the rough ShivaniX is a jewel in the rough
What is a Form collection

What is a Form collection?

ShivaniX is offline Offline   Reply With Quote
Old 16-06-08, 03:19 PM   #2 (permalink)
Junior Member
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 nasersaudagar is on a distinguished road
Re: What is a Form collection

What is a Form collection?

The Form collection is used to retrieve the values of form elements from a form that uses the POST method.
Note: If you want to post large amounts of data (beyond 100 kb) the Request.Form cannot be used.
Syntax


Request.Form(element)[(index)|.Count]

Parameter Description
element Required. The name of the form element from which the collection is to retrieve values
index Optional. Specifies one of multiple values for a parameter. From 1 to Request.Form(parameter).Count.
Examples

Example 1
You can loop through all the values in a form request. If a user filled out a form by specifying two values - Blue and Green - for the color element, you could retrieve those values like this:

<%
for i=1 to Request.Form("color").Count
Response.Write(Request.Form("color")(i) & "
")
next
%> Output:

Blue
Green Example 2
Consider the following form:


First name:

Last name:

Your favorite color:





The following request might be sent:

firstname=John&lastname=Dove&color=Red Now we can use the information from the form in a script:

Hi, <%=Request.Form("firstname")%>.
Your favorite color is <%=Request.Form("color")%>. Output:

Hi, John. Your favorite color is Red. If you do not specify any element to display, like this:

Form data is: <%=Request.Form%> the output would look like this:

Form data is: firstname=John&lastname=Dove&color=Red
nasersaudagar is offline Offline   Reply With Quote
Reply

Tags
asp.net , collection , form , interview questions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JAVA collection naga JAVA Technologies 1 11-01-09 12:38 AM
ORACLE placement paper 16 sridhar ORACLE Placement Papers 0 09-02-07 07:38 PM
Asp - difference between Querystring collection and Form collection preethisingh vb / asp.net Interview / Technical Questions 0 24-01-07 07:55 PM
Asp - What is a Form collection? preethisingh vb / asp.net Interview / Technical Questions 0 24-01-07 07:54 PM
Asp - difference between Cookies collection and Form collection preethisingh vb / asp.net Interview / Technical Questions 0 24-01-07 05:57 PM


All times are GMT +6.5. The time now is 04:28 AM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.2