asp:Button stopped working without changing the code












0















I'm stuck on this error and I cannot figure it out why is happening. I took a look on the web in order to find something helpfull but there is nothing specific about my case, at least I couldn't find it.





Error:




CS1061: 'beaulard21_aspx' does not contain a definition for 'Btn_submit_Click' and no extension method 'Btn_submit_Click' accepting a first argument of type 'beaulard21_aspx' could be found (are you missing a using directive or an assembly reference?).






Snippet where the error occurs:






<form>
<div class='form-group'>
<input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
</div>
<div class='form-group'>
<input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
</div>
<div class='form-group'>
<textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
</div>
<!-- Error is thrown in the next line -->
<asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
</form>





My code behind function:



private void Btn_submit_Click(object sender, EventArgs e)
{
//EMAIL SENDING ALGORITHM
}




Remarks



I have the same form with the same button and the same IDs in other 2 pages, and currently they work perfectly. Yesterday this page was also working without any issues and I didn't change anything. I'm not getting the point.



Any help would be appreciated.










share|improve this question



























    0















    I'm stuck on this error and I cannot figure it out why is happening. I took a look on the web in order to find something helpfull but there is nothing specific about my case, at least I couldn't find it.





    Error:




    CS1061: 'beaulard21_aspx' does not contain a definition for 'Btn_submit_Click' and no extension method 'Btn_submit_Click' accepting a first argument of type 'beaulard21_aspx' could be found (are you missing a using directive or an assembly reference?).






    Snippet where the error occurs:






    <form>
    <div class='form-group'>
    <input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
    </div>
    <div class='form-group'>
    <input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
    </div>
    <div class='form-group'>
    <textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
    </div>
    <!-- Error is thrown in the next line -->
    <asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
    </form>





    My code behind function:



    private void Btn_submit_Click(object sender, EventArgs e)
    {
    //EMAIL SENDING ALGORITHM
    }




    Remarks



    I have the same form with the same button and the same IDs in other 2 pages, and currently they work perfectly. Yesterday this page was also working without any issues and I didn't change anything. I'm not getting the point.



    Any help would be appreciated.










    share|improve this question

























      0












      0








      0








      I'm stuck on this error and I cannot figure it out why is happening. I took a look on the web in order to find something helpfull but there is nothing specific about my case, at least I couldn't find it.





      Error:




      CS1061: 'beaulard21_aspx' does not contain a definition for 'Btn_submit_Click' and no extension method 'Btn_submit_Click' accepting a first argument of type 'beaulard21_aspx' could be found (are you missing a using directive or an assembly reference?).






      Snippet where the error occurs:






      <form>
      <div class='form-group'>
      <input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
      </div>
      <div class='form-group'>
      <input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
      </div>
      <div class='form-group'>
      <textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
      </div>
      <!-- Error is thrown in the next line -->
      <asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
      </form>





      My code behind function:



      private void Btn_submit_Click(object sender, EventArgs e)
      {
      //EMAIL SENDING ALGORITHM
      }




      Remarks



      I have the same form with the same button and the same IDs in other 2 pages, and currently they work perfectly. Yesterday this page was also working without any issues and I didn't change anything. I'm not getting the point.



      Any help would be appreciated.










      share|improve this question














      I'm stuck on this error and I cannot figure it out why is happening. I took a look on the web in order to find something helpfull but there is nothing specific about my case, at least I couldn't find it.





      Error:




      CS1061: 'beaulard21_aspx' does not contain a definition for 'Btn_submit_Click' and no extension method 'Btn_submit_Click' accepting a first argument of type 'beaulard21_aspx' could be found (are you missing a using directive or an assembly reference?).






      Snippet where the error occurs:






      <form>
      <div class='form-group'>
      <input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
      </div>
      <div class='form-group'>
      <input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
      </div>
      <div class='form-group'>
      <textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
      </div>
      <!-- Error is thrown in the next line -->
      <asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
      </form>





      My code behind function:



      private void Btn_submit_Click(object sender, EventArgs e)
      {
      //EMAIL SENDING ALGORITHM
      }




      Remarks



      I have the same form with the same button and the same IDs in other 2 pages, and currently they work perfectly. Yesterday this page was also working without any issues and I didn't change anything. I'm not getting the point.



      Any help would be appreciated.






      <form>
      <div class='form-group'>
      <input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
      </div>
      <div class='form-group'>
      <input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
      </div>
      <div class='form-group'>
      <textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
      </div>
      <!-- Error is thrown in the next line -->
      <asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
      </form>





      <form>
      <div class='form-group'>
      <input name='email' type='email' class='form-control' id='emailCliente' placeholder='Email' runat='server'>
      </div>
      <div class='form-group'>
      <input name='name' type='text' class='form-control' id='nomeCliente' placeholder='Nome' runat='server'>
      </div>
      <div class='form-group'>
      <textarea name='comment' class='form-control' rows='5' id='messaggio' placeholder='Messaggio (opzionale)' runat='server'></textarea>
      </div>
      <!-- Error is thrown in the next line -->
      <asp:Button id='BtnInvia' Text='Invia' CssClass='btn btn-secondary' OnClick='Btn_submit_Click' runat='server'/>
      </form>






      c# asp.net






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 18 at 14:16









      SimoSimo

      918317




      918317
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Try to delete the button and the code behind and then make a rebuild for your solution and then create it again.
          sometimes caching in VS makes some unexpected problems!



          I hope this will helpful for you!






          share|improve this answer
























          • Love you man <3

            – Simo
            Jan 18 at 14:43











          • You're Welcome :D

            – Mohammad Taher Assad
            Jan 19 at 8:39



















          1















          • Ensure you don't have any other errors or warnings.

          • Try to remove event handler name in your HTML and generate it again using Visual Studio. Then check if it appears in the same code-behind file you looked before.






          share|improve this answer
























          • I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

            – Simo
            Jan 18 at 14:37











          • Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

            – Simo
            Jan 18 at 14:44











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54255825%2faspbutton-stopped-working-without-changing-the-code%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Try to delete the button and the code behind and then make a rebuild for your solution and then create it again.
          sometimes caching in VS makes some unexpected problems!



          I hope this will helpful for you!






          share|improve this answer
























          • Love you man <3

            – Simo
            Jan 18 at 14:43











          • You're Welcome :D

            – Mohammad Taher Assad
            Jan 19 at 8:39
















          1














          Try to delete the button and the code behind and then make a rebuild for your solution and then create it again.
          sometimes caching in VS makes some unexpected problems!



          I hope this will helpful for you!






          share|improve this answer
























          • Love you man <3

            – Simo
            Jan 18 at 14:43











          • You're Welcome :D

            – Mohammad Taher Assad
            Jan 19 at 8:39














          1












          1








          1







          Try to delete the button and the code behind and then make a rebuild for your solution and then create it again.
          sometimes caching in VS makes some unexpected problems!



          I hope this will helpful for you!






          share|improve this answer













          Try to delete the button and the code behind and then make a rebuild for your solution and then create it again.
          sometimes caching in VS makes some unexpected problems!



          I hope this will helpful for you!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 18 at 14:32









          Mohammad Taher AssadMohammad Taher Assad

          364




          364













          • Love you man <3

            – Simo
            Jan 18 at 14:43











          • You're Welcome :D

            – Mohammad Taher Assad
            Jan 19 at 8:39



















          • Love you man <3

            – Simo
            Jan 18 at 14:43











          • You're Welcome :D

            – Mohammad Taher Assad
            Jan 19 at 8:39

















          Love you man <3

          – Simo
          Jan 18 at 14:43





          Love you man <3

          – Simo
          Jan 18 at 14:43













          You're Welcome :D

          – Mohammad Taher Assad
          Jan 19 at 8:39





          You're Welcome :D

          – Mohammad Taher Assad
          Jan 19 at 8:39













          1















          • Ensure you don't have any other errors or warnings.

          • Try to remove event handler name in your HTML and generate it again using Visual Studio. Then check if it appears in the same code-behind file you looked before.






          share|improve this answer
























          • I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

            – Simo
            Jan 18 at 14:37











          • Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

            – Simo
            Jan 18 at 14:44
















          1















          • Ensure you don't have any other errors or warnings.

          • Try to remove event handler name in your HTML and generate it again using Visual Studio. Then check if it appears in the same code-behind file you looked before.






          share|improve this answer
























          • I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

            – Simo
            Jan 18 at 14:37











          • Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

            – Simo
            Jan 18 at 14:44














          1












          1








          1








          • Ensure you don't have any other errors or warnings.

          • Try to remove event handler name in your HTML and generate it again using Visual Studio. Then check if it appears in the same code-behind file you looked before.






          share|improve this answer














          • Ensure you don't have any other errors or warnings.

          • Try to remove event handler name in your HTML and generate it again using Visual Studio. Then check if it appears in the same code-behind file you looked before.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 18 at 14:26









          opewixopewix

          4,02311135




          4,02311135













          • I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

            – Simo
            Jan 18 at 14:37











          • Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

            – Simo
            Jan 18 at 14:44



















          • I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

            – Simo
            Jan 18 at 14:37











          • Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

            – Simo
            Jan 18 at 14:44

















          I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

          – Simo
          Jan 18 at 14:37





          I don't have any error or warning when I compile the solution. Now I'm trying the second point you suggested.

          – Simo
          Jan 18 at 14:37













          Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

          – Simo
          Jan 18 at 14:44





          Thanks for the help, I chose the other answer as solution because it was more accurate for my case. Anyway you deserve an upvote for sure. Thanks alot

          – Simo
          Jan 18 at 14:44


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54255825%2faspbutton-stopped-working-without-changing-the-code%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Liquibase includeAll doesn't find base path

          How to use setInterval in EJS file?

          Petrus Granier-Deferre