passing form in a module and access its controls in asp.net

C

Chris

I need to pass a form say 'webform1' in a class file myClass (.vb)
and access its web controls say 'txtdisp', .....

My code snippet is :

Imports System.Web.UI
public class myClass

public sub disableitems(ByRef frm as WebForm1)
'Here my intention is to set enabled property of txtdisp to false
'And this control is in WebForm1.
'The below code is not working for me.
frm.txtdisp.enabled = false
end sub

end class
 
S

Senthilkumar

Hi,

If all you want is to set the enabled property or some other property, then
you might consider using the DynamicProperties from the Properties list.

Senthil
 

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

Top