.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to Override Page_Init()

Posted By: Murthy     Posted Date: March 11, 2011    Points:5   Category :ASP.Net
Hai All,

Can anyone tell When can we override the Page_Init() ? (i.e. any example in which scenarios )

Thanks in Advance

Murthy

Responses
Author: Maverick             
Posted Date: March 12, 2011     Points: 20   

Hello,

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (this._theme != null)
{
this._theme.SetStyleSheet();
}
if (this._styleSheet != null)
{
this._styleSheet.SetStyleSheet();
}
}

Hope it helps this one is for applying style sheet

Thanks,
Maverick

Thanks,
Maverick
Author: chandrakant             
Posted Date: March 19, 2011     Points: 20   


protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if ( _text == null)
_text = "Here is some default text.";
}

Thanks

Chandrakant



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend