Dynamically define variables in VB.Net/ASP.Net

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
 
S

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.
 
J

Juan T. Llibre

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 ?




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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top