By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,185 Members | 1,420 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,185 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Jan 11 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"Chris" <ch***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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

Jan 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.