Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Viveka Fischer   on Dec 07 In Asp.net Category.

  
Question Answered By: Tammy Sanders   on Dec 07

I'm new on this hread but I can tell you taht theframework will prefix the name
of your control with an id it geneartes - usually ctl + a number.

So request.Form("LoginName") won't work  .... it has to be
Request.Form("ctl5_LoginName");

You can get a collection of form  members and loop through them ... thats in ms
help ....

In VB ...


Dim loop1 As Integer
Dim arr1() As String
Dim coll As NameValueCollection

' Load Form variables into NameValueCollection variable.
coll=Request.Form

' Get names of all forms into a string array.
arr1 = coll.AllKeys
For loop1 = 0 To arr1.GetUpperBound(0)
Response.Write("Form: " & arr1(loop1) & "<br>")
Next loop1


Then add a line to see the values Response.Write("Values are": " &
Request.Form(arr1(loop1)) & "<br>")

VB not  my systax so that may ot compile.

Share: 

 
 


Tagged: