Hello,
Question is not very clear but understand you can try these to solve your issue
Option1:
<asp:button id="Button1" runat="server" cssclass="button" text="Add" xmlns:asp="#unknown">
Width="79px" onclick="Sum()" /></asp:button>
option2:
<asp:button id="Button1" runat="server" cssclass="button" text="Add" xmlns:asp="#unknown">
Width="79px" onclick="javascript:Sum()" />
</asp:button>
option3:If you want server side and client side call
<asp:button id="Button1" runat="server" cssclass="button" text="Add" xmlns:asp="#unknown">
Width="79px" onclick="Button1_Click1" onclientclick="return Sum()" />
</asp:button>
Change your Script:
function sum()
{
var sales_cost=document.getElementById("<%=txtsales_cost.ClientID%>").value;
var vat=document.getElementById("<%=ddvat.ClientID%>").value;
document.getElementById("<%=txtnetamt.ClientID%>").innerHTML=parseInt(sales_cost)+parseInt(sales_cost)*vat/100;
return false;
}