c# - Button_Click method no longer works -


i modifying large (11 page) web form inherited previous employee. new @ asp , html5, etc. modified many lines of code, haven't touched button code in either html or c#. button_click method used work, in clicking button run form validation code , data saving code. here html:

<div style="position: relative; float: right">    <asp:button id="button1" runat="server" text="submit" onclick="button1_click" class="btn btn-primary" />  </div>

and here code-behind button_click:

    protected void button1_click(object sender, eventargs e)     {         if (validationform())         {             savedata();         }     } 

i put breakpoints inside button1_click , function never entered. there way debug see what's going on?

here's top of aspx page:

<%@ page language="c#" autoeventwireup="true" codebehind="default.aspx.cs" inherits="smacklabproject._default" %>      <!doctype html>    <html xmlns="http://www.w3.org/1999/xhtml">      <head runat="server">    ...

i have not changed inherits. don't know inherits does.

here's top of aspx.cs (below using):

namespace smacklabproject {     public partial class _default : system.web.ui.page     {         protected void page_load(object sender, eventargs e)         {         }         protected void button1_click(object sender, eventargs e)         {             if (validationform())             {                 savedata();             }         }         private void savedata()         {             string study = study_dropdown.selectedvalue;             ... 

ok happened me once.

so if you're using visual studio, click button @ top has start sign run , start debugging.

if run right-clicking solution explorer , selecting view in browser option, not consider back-end code.

i can't comment yet sadly that's why had post answer.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -