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

Explain the differences between clr & cts?

0 Answers  


What is the purpose of App_Code folder in ASP.NET? Why we this?

0 Answers   Sans Pareil IT Services,


What is the T-SQL equivalent of IIF (immediate if/ternary operator) function of other programming languages?

1 Answers   Syntax Softtech,


Who creates jsessionid?

0 Answers  


How many types of cookies are available in asp?

0 Answers  


How many types are there session

5 Answers   TCS,


What is advantage of viewstate and what are benefits ?

1 Answers  


How do you manage session in ASP and ASP.NET?

1 Answers   Microsoft,


what are the State management and Its Uses

2 Answers  


what are the files used in asp .net

1 Answers  


What is a PostBack ?

1 Answers  


Differentiate between globalization and localization.

0 Answers  


Categories