c# - asp:Button is not calling server-side function -


i'm instantiating asp:button inside data-bound asp:gridview through template fields. of buttons supposed call server-side function, weird reason, doesn't. buttons when click them fire postback current page, doing nothing, reloading page.

below fragment of code:

<asp:gridview id="gv" runat="server" autogeneratecolumns="false" cssclass="l2 submissions" showheader="false">     <columns>                <asp:templatefield>                         <itemtemplate><asp:panel id="swatchpanel" cssclass='<%# bind("status") %>' runat="server"></asp:panel></itemtemplate>                             <itemstyle width="50px" cssclass="sw" />         </asp:templatefield>          <asp:boundfield datafield="description" readonly="true">                                         </asp:boundfield>          <asp:boundfield datafield="owner" readonly="true">             <itemstyle font-italic="true" />         </asp:boundfield>          <asp:boundfield datafield="last-modified" readonly="true">             <itemstyle width="100px" />         </asp:boundfield>          <asp:templatefield>             <itemtemplate>                 <asp:button id="viewbtn" cssclass='<%# bind("sid") %>' runat="server" text="view" onclick="viewbtnclick" />             </itemtemplate>         </asp:templatefield>                                               </columns> </asp:gridview> 

the viewbtn above should call viewbtnclick() function on server-side. have function defined, along proper signature (object,eventargs). 1 thing may of note code inside ascx, loaded in ascx, loaded aspx.

any or insight matter appreciated. thanks!

(oh, , please don't mind trashy html/css semantics - still in very,very stage :p)

is autowireupevents set true?


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -