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 / 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 |
Page Life Cycle in ASP.NET
what are the components available in global.asax ?
What is asp.net file?
Describe the application event handlers in ASP.NET?
Explain difference between friend and protected friend?
With example & diagram explain AutoPostBack.
whats the best method to cal id in javascript
What is advantage of code behind coding in ASP.NET?
0 Answers Sans Pareil IT Services,
How many types of validation are there?
What is difference between session and cookie?
In which event of the page viewstate is available?
What are query strings used for?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)