Dynamically define variables in VB.Net/ASP.Net

  • Thread starter Thread starter SV
  • Start date Start date
S

SV

Hi there,

I am using ASP.Net 2.0 with VB.Net.

I want to define variables. For example I want to create variable of
type TableRow and while defining I don't know how many rows i needed.
So what i want to do in my code:

For i As Integer = 0 To dt.Tables(0).Rows.Count - 1
dim tr_i as New TableRow

' other code.....

Next i

But it will define variable as tr_i...but i want tr_0,
tr_1,tr_2,.........

Is it possible?

Thanks,

SV
 
Thanks all for your replies.

I think I was not able to explain you very well. But I tried to do the
things using arrays but didn’t get exactly what I want.
Anyways, I have solved the problem.

I really appreciate your precious replies.
Thanks.
 
re:
!> Anyways, I have solved the problem

It could help others if you posted the solution you arrived at.
Sharing information like that is the very purpose of these newsgroups.

Can you ?



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
Thanks all for your replies.

I think I was not able to explain you very well. But I tried to do the
things using arrays but didn’t get exactly what I want.
Anyways, I have solved the problem.

I really appreciate your precious replies.
Thanks.
 
Back
Top