c# - ASP.Net Button not raising postback -


i've simple page in 1 of our web applications, has following markup:

    <%@ page language="c#" autoeventwireup="true" codebehind="newupload.aspx.cs" inherits="mass_upload.newupload" masterpagefile="~/master" title="document mass upload" %> <asp:content id="content1" contentplaceholderid="head" runat="server">     <link rel="stylesheet" type="text/css" href="./../css/scrollingtable.css" />     <script type="text/javascript" src="../help/helppopup.js" /> </asp:content> <asp:content id="content2" contentplaceholderid="centerh1" runat="server">     document mass upload <a href="javascript:loadhelpvid(5)"><img style="border:none;" src="../help/help_icon.gif" /></a> </asp:content> <asp:content id="content3" contentplaceholderid="centerbody" runat="server">     <h3>add new upload</h3>     <table class="list">         <tr>             <td class="label" style="text-align:right;">local file:</td>             <td class="normal">                 <asp:fileupload id="fufilename" runat="server" width="405" />                 <asp:requiredfieldvalidator id="requiredfieldvalidator1" text="*"                             errormessage="a file upload required"                             display="dynamic"                             controltovalidate="fufilename"                             validationgroup="documentupload"                             runat="server" />             </td>         </tr>         <tr>             <td class="label" style="text-align:right;">document description:</td>             <td class="normal">                 <asp:textbox id="txtdescription" runat="server" width="405" maxlength="50" />                 <asp:requiredfieldvalidator id="requiredfieldvalidator3" text="*"                             errormessage="document description required field"                             display="dynamic"                             controltovalidate="txtdescription"                             validationgroup="documentupload"                             runat="server" />             </td>         </tr>         <tr>             <td class="label" style="text-align:right;">document type:</td>             <td class="normal">                 <asp:dropdownlist id="dddoctype" runat="server" width="405"/>                 <asp:requiredfieldvalidator id="requiredfieldvalidator2" text="*"                             errormessage="document type required field"                             display="dynamic"                             controltovalidate="dddoctype"                             validationgroup="documentupload"                             runat="server" />             </td>         </tr>         <tr>             <td class="label" style="vertical-align:top;text-align:right;">customer types:</td>             <td class="normal">                 <asp:label id="lblsinglecustomer" text="specific code:" runat="server" /><asp:textbox id="txtsinglecustomer" runat="server" width="100px" /><br />                 <asp:checkboxlist id="cblcustomertypes" runat="server" width="405px" repeatdirection="horizontal" repeatcolumns="5" repeatlayout="table" cellpadding="10" cellspacing="0" />             </td>         </tr>         <tr>             <td class="normal" colspan="2">&nbsp;</td>         </tr>         <tr>             <td class="normal" colspan="2"><asp:label id="lblerror" runat="server" text="" forecolor="red"/></td>         </tr>         <tr>             <td class="normal" colspan="2">                 <asp:button id="btncancel" runat="server" text="cancel" onclick="btncancel_click" cssclass="medium" />                 <asp:button id="btnupload" runat="server" text="upload" onclick="btnupload_click" cssclass="medium" />             </td>         </tr>     </table> </asp:content> 

it used work fine, now, , without apparent change code/design, both "upload" , "cancel" buttons no longer work.

putting breakpoint in codebehind's page_load() method shows called when page loaded, , not when button pressed. similarly, putting breakpoint in "btnupload_click" event shows never called.

this not working both on own development machine , on client's server (both when browsing servers page machine , server itself).

it's important stress that, between working , not working, 90% sure nothing has changed in regards code.

any appreciated, customer rightly anxious - , i'm clueless what's causing it!


edit #1

here's codebehind 1 of buttons:

protected void btnupload_click(object sender, eventargs e)     {         if (dataaccess.checkifmassuploadalreadyexists(fufilename.filename))         {             lblerror.text = "a file specified name exists within system.";             return;         }         else         {             try             {                 uploadfile();             }             catch(exception ex)             {                 lblerror.text = ex.message;// +"\nusername:" + system.web.httpcontext.current.user.identity.name;                 return;             }         }     } 

.

here's reason.. , it's annoying reason too!

this:

<script type="text/javascript" src="../help/helppopup.js" /> 

should this:

<script type="text/javascript" src="../help/helppopup.js"></script> 

whoever decided script tag needs treated differently every other html tag, needs locked in room justin bieber.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -