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

problem setting properties to User control

P: n/a
I used the technique from this article
http://msdn.microsoft.com/asp.net/us...ercontrols.asp,
that set the properties to ViewState but I have 2 problems:
1. An object reference error when I tried to set user control's property
like the article did ( the sample code from the article actually worked )
2. When I created an instance of that user control to solve the problem from
#1, then set its property but it didn't take. ( I also tried to not use
ViewState but no work either )

The aspx file inherits Page and ascx file inherits UserControl like the
article has.

Anybody has this same problem or knows what I am doing wrong?

Thanks,
Lan
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It worked with FindControl method. Use it for now.

"Lan H. Nguyen" <la**@wizardones.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I used the technique from this article
http://msdn.microsoft.com/asp.net/us...ercontrols.asp, that set the properties to ViewState but I have 2 problems:
1. An object reference error when I tried to set user control's property
like the article did ( the sample code from the article actually worked )
2. When I created an instance of that user control to solve the problem from #1, then set its property but it didn't take. ( I also tried to not use
ViewState but no work either )

The aspx file inherits Page and ascx file inherits UserControl like the
article has.

Anybody has this same problem or knows what I am doing wrong?

Thanks,
Lan

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.