I Suggest U to put this code in a javascript function, like this :
<script>
function myFunction() {
$.msg({
bgPath: '../Pictures/Images/',
content: '
Server Error
',
klass: 'white',
fadeIn: '200',
fadeOut: '100',
timeOut: '10000'
});
}
</script>
call this function in c# like this :
ClientScript.RegisterStartupScript(GetType(), "js", "myFunction();", true);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "js", "myFunction();", true);