Main.Master
ボタンのあるページがあります。
デザイン ビューでそのボタンをダブルクリックすると、Main.Master
以下のようなページでクリック イベントが作成されます。
<script runat="server">
protected void btnKayit_Click(object sender, EventArgs e)
{
}
</script>
ページで作成したいのですMain.Master.cs
が、これを手動で行うと、このエラーが発生します。
CS1061: 'ASP.main_master' does not contain a definition for 'btnKayit_Click' and no extension method 'btnKayit_Click' accepting a first argument of type 'ASP.main_master' could be found (are you missing a using directive or an assembly reference?)
どうすればこの問題を解決できますか?
編集: aspx コード;
<asp:Button CssClass="arama" ID="btnKayit" runat="server" Text="Kayıt Ol" Height="30px"
Width="75px" Style="margin: 0px; float: left; width: 75px; padding: 0px; margin-bottom: 0px;
color: #d55355; font-size: 12px" onclick="btnKayit_Click" />