M
maarif
The controls placed over an ASP.NET page can be accessed using
following loop:
For Each lControl In Page.Controls
. . . .
. . . .
Next
BUT this works only in code behind of that particular page.
I have another project where I need all these controls BUT not like
above loop. I want to access these controls like attributes of a class
as follows:
MyPage.Text1.Text = "100"
MyPage.Text2.Text = "200"
MyPage.Text3.Text = CInt(MyPage.Text1.Text) + CInt(MyPage.Text2.Text)
Is there any way to access the controls of an ASP.NET page?
following loop:
For Each lControl In Page.Controls
. . . .
. . . .
Next
BUT this works only in code behind of that particular page.
I have another project where I need all these controls BUT not like
above loop. I want to access these controls like attributes of a class
as follows:
MyPage.Text1.Text = "100"
MyPage.Text2.Text = "200"
MyPage.Text3.Text = CInt(MyPage.Text1.Text) + CInt(MyPage.Text2.Text)
Is there any way to access the controls of an ASP.NET page?