Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Controls

Status
Not open for further replies.

transparent

Programmer
Sep 15, 2001
333
GB
Hi all.

I'm building a custom control which generates a date picker.

In my control, if I try to access data (that's stored in the viewstate of the custom control) within the onint event, I can't access the viewstate data.

If I do this in the page_load event of the custom control, I can access this data.

However I need to be able to access this data before the controls page load event (since the containing pages page-load event will have fired before the custom controls event).

Ho do I do this?
 
expand the: #Region " Web Form Designer Generated Code "

Place code there:
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent() 'before this line
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top