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?

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


Please Help Members By Posting Answers For Below Questions

Describe how ASP.NET maintains process isolation for each Web application?

1087


What are the parts of an http response?

979


How would you get asp.net running in apache web servers?

1028


What do you mean by caching in asp.net?

1025


What is s2s tracking?

984


How do you implement sql caching in asp.net?

1063


What is web api config?

982


Why is global asax is used?

1032


What is form method?

935


What is different authentication mechanisms used in ASP.NET?

1131


How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?

1044


Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

979


What are the difference between overriding and overloading?

1085


What are the asp.net security controls?

1167


Give an example of what might be best suited to place in the application_start and session_start subroutines?

968