I have a method written in WebForm (means .aspx page) & now
I want to call this method in WebUserControl (means .ascx
page) what should I have to do?
Answer Posted / jp
Use the controls page property and typecast it to the page
class name.
eg:
Page Default.aspx has a control MyControl.ascx
Page Default.aspx.cs has a method MyMethod()
in MyControl.ascx.cs
((Default)(this.Page)).MyMethod();
| Is This Answer Correct ? | 7 Yes | 8 No |
Post New Answer View All Answers
How to use multiple scriptmanager controls in a web page?
What’s difference between “optimistic” and “pessimistic” locking?
What is cache in asp net?
What is the difference between CC and BCC?
What is data cache in sql server?
What is the behavior of a Web browser when it receives an invalid element?
How do I create a web form?
What are validator? Name the validation controls in asp.net? How do you disable them?
What is ASLM?
What is the difference between localization and globalization?
What are the disadvantages of view state?
How would you enable impersonation in the web.config file?
What is form method?
How information about the user's locale can be accessed?
What are the different types of Caching techniques in ASP.NET?