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 the asp.net objects? is it application obects, cache objests etc. or is it state managements, web services etc?

3 Answers   Syntel,


Explain autherization levels in .net ?

2 Answers  


What is simple data binding?

0 Answers  


write a sample code make use of xmltext writer

1 Answers   GCI,


You are using the try? catch block seen in the following code segment, but no exceptions are ever caught by the catch block. What is the problem? SqlConnection cn =new sqlConnection(strSQL); SqlDataSet ds; try { cn.open(); //perform the data processing steps ??.. } catch (OleDbException e) { ?.. } a) The exception class is wrong; it should be sqlErrors. b) The exception class is wrong; it should be sqlSyntaxExceptios. c) The exception class is wrong; it should be sqlExceptions. d) The exception class is wrong; it should be sqlExcptions.

2 Answers   Microsoft, Syntax Softtech,


What is ViewState and How it is managed,Its Advantages/Benefits?

4 Answers   Google,


Define viewstate in .net?

0 Answers  


Can you edit data in the Repeater control?

11 Answers   CAC, Creative,


Why do we need master page in asp.net?

0 Answers  


how many script manager controls are used in Ajax web page?

7 Answers   CSC, Health Prime Services, TCS,


What is difference b/w Data Grid in ASP.Net 1.1 and Gridview in 2.0

11 Answers   Bosch, IntraLogic,


Which library is used by the testers and developers to develop automated tests and create testing tools?

0 Answers  


Categories