PagePreInit set value of Theme - ASP.NET Introduction

Q.  In which Event you can set the value of a Theme?
- Published on 19 Oct 15

a. Page_Load
b. Page_Render
c. Page_PreRender
d. Page_PreInit

ANSWER: Page_PreInit
 
To apply a theme programmatically, you can use to set the page’s Theme property in the Page_PreInitmethod. Page_PreInitis the proper method in which you can specify the theme.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)