![]() |
|
| 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. |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Senior Member Join Date: Apr 2008
Posts: 13,341
Thanks: 0
Thanked 26 Times in 26 Posts
Rep Power: 137 | What is a Form collection What is a Form collection? |
| | |
| | #2 (permalink) | |||||||
| Junior Member Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 | 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
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: 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 | |||||||
| | |
![]() |
| Tags |
| asp.net , collection , form , interview questions |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
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 |
| More Interview Questions Here... |