Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



I have a method written in WebForm (means .aspx page) & now I want to call this method in WebU..

Answer / 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

More ASP.NET Interview Questions

What are triggers of an updatepanel?

0 Answers  


I need to download file from web server, without using save as dialogue box. Can anyone help, thanks In advance.

1 Answers  


How can you make sure that web api returns json data only?

0 Answers  


What is mvc in asp.net tutorial? : Asp.Net MVC

0 Answers  


what is synchronization and asynchronization. what are the difference between two?

1 Answers   TCS,


What is the difference between localization and globalization?

0 Answers  


How to remove cache object in asp.net?

2 Answers   TVS,


What is different authentication mechanisms used in ASP.NET?

0 Answers   Amdocs,


What is CSS? What is the advantage os using CSS in ASP.NET Web Applications?

2 Answers   PCS,


Is a dll file an executable?

0 Answers  


What are HTTP handlers in ASP.NET?

0 Answers   MindCracker,


What is the purpose of url encoding?

0 Answers  


Categories