Click here to Skip to main content
15,911,762 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using a button control,I need to set the SkinId when Button is clicked.

C#
protected void Page_PreInit(object sender, EventArgs e)
    {
        btCreateDocumentBox.SkinID = "selectedButton";
     }


I am getting an exception like
"Object reference not set to an instance of an object"
Posted

1 solution

Have you tried setting the SkinID in the OnPreInit method? This is where Themes and such like are generally applied dynamically. Just a thought.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900