To allow OnClick and OnCommand event in SharePoint add this script into web.config file
< SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
< PageParserPaths>
< PageParserPath VirtualPath="/amu2/*" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths >
</SafeMode>