July 29th, 2012, 03:54 PM
VB.NET 3.5 Request Headers and label(num).text Pragmatically
I have two questions:
1) I am using a function for getting and posting data. I am wondering if there is any difference between:
2) Is there any way to change a number pragmatically for the name of a label?
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
For instance if I have label0.text and label1.text and label2.text etc I would like to use a for loop to cycle through them. Is there any way to do this?
Thank you in advance.
July 30th, 2012, 01:47 PM
I cannot answer question 1 because I use direct Winsock calls for Internet access, but as far as the second question is concerned, you should be able to access the controls by number instead of by name (assuming you mean programatically instead of pragmatically):
I also assumed that you meant Textbox controls instead of Label controls, since Label controls do not have a Text property.
Private Sub Command1_Click()
Dim N As Integer
For N = 0 To Controls.Count - 1
If TypeOf Controls(N) Is TextBox Then