Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting form field values

Reply
Thread Tools

Getting form field values

 
 
John
Guest
Posts: n/a
 
      10-09-2004
Hi

Is there an asp.net equivalent of the following code in the context of a
form?

for i = 1 to Request.Form.Count
strMsgInfo = strMsgInfo & Request.Form.Key(i) & ": " &
Request.Form.Item(i) & vbCrLf & vbCrLf
next

Thanks

Regards


 
Reply With Quote
 
 
 
 
Alex Homer
Guest
Posts: n/a
 
      10-09-2004
<asp:Label id="lblRequest" runat="server" />

Then, in the Page_Load event handler:

' display the values in the Request collections
lblRequest.Text &= "* QueryString collection:<br />"
For Each oValue As String In Request.QueryString
lblRequest.Text &= "&nbsp; " & oValue & " = " _
& Request.QueryString(oValue) & "<br />"
Next
lblRequest.Text &= "* Form collection:<br />"
For Each oValue As String In Request.Form
lblRequest.Text &= "&nbsp; " & oValue & " = " _
& Request.Form(oValue) & "<br />"
Next


"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> Is there an asp.net equivalent of the following code in the context of a
> form?
>
> for i = 1 to Request.Form.Count
> strMsgInfo = strMsgInfo & Request.Form.Key(i) & ": " &
> Request.Form.Item(i) & vbCrLf & vbCrLf
> next
>
> Thanks
>
> Regards
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass hidden form field value to another form field to insert in db GavMc ASP General 4 09-22-2005 06:33 PM
Can you persist table cell values like you do with form field values? Richard Dixson ASP .Net 2 05-18-2004 01:11 PM
Can you persist table cell values like you can do with form field values? Richard Dixson ASP .Net 1 05-18-2004 03:47 AM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven Javascript 3 05-13-2004 12:15 AM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven ASP General 3 05-13-2004 12:15 AM



Advertisments