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

Page Life Cycle in ASP.NET

2 Answers   Syntel,


what are the components available in global.asax ?

1 Answers  


What is asp.net file?

0 Answers  


Describe the application event handlers in ASP.NET?

0 Answers   HCL,


Explain difference between friend and protected friend?

0 Answers  


With example & diagram explain AutoPostBack.

2 Answers  


whats the best method to cal id in javascript

2 Answers  


What is advantage of code behind coding in ASP.NET?

0 Answers   Sans Pareil IT Services,


How many types of validation are there?

0 Answers  


What is difference between session and cookie?

0 Answers  


In which event of the page viewstate is available?

0 Answers  


What are query strings used for?

0 Answers  


Categories