VB でのコーディングから C# に切り替えたばかりなので、追いつくべきことがたくさんあります。この 1 について支援してください。
aspx ページに JavaScript 関数があり、バックエンドから関数をトリガーしたいと考えています。
以下はバックエンドでの私のコードです。
ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "showMessage('test')", true);
残念ながら、以下のようなエラーが発生しました。
Error 30 Keyword 'this' is not valid in a static property, static method, or static field initializer.
助けてください。