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


Post New Web Links

page_init

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net
 

protected void Page_PreInit(object sender, EventArgs e)

{

}




protected void Page_Load(object sender, EventArgs e){}



i have these two functions with code in them i placed a breakpoint at the page_Preinit   but when i run the application it does not enter the breakpoint.

why??




View Complete Post


More Related Resource Links

Usercontrols value on page_init

  

Hello, In one of my pages I use an usercontrol. The usercontrol has a textbox and a button on it.

When someone adds text to the usercontrols textbox, I want to use the entered text in my page_init event.

The problem is that in the page_init event, the textbox value is empty. How can I use the entered text in the page_init event?

Best regards


Page_Init firing on each postback

  

I am having a problem with web pages in a .Net site where the Page_Init is firing on each postback rather than the normal behavior (Page_Init fired initially, and only Page_Load fired on postbacks)

Several comments:

1.  AutoEventWireup is set to false on all pages, with a "Handles Me.Init" set on Page_Init.  All events are defined with the "Handles" verb as shown below

2.  Each web page is subclassed to a parent class which provides strongly-typed access to the contents of session variables.

3.  The Page_Load event for most of the pages performs a DataBind operation on a gridview control.

Partial Public Class SamplePage
    Inherits PageManager (PageManager inherits from System.Web.UI.Page)

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

        ...

    End Sub

Any ideas?


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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