function in javascript:
function updatealert()
{
var f = document.getElementById('<%=(gvStock.FooterRow.FindControl("txtQnty")).ClientID%>');
if(f.value =='' ")
{
alert("Enter Quantity");
return false;
}
}
gridview template:
<asp:Button runat="server" ID="btnUpdate" Text="Update" onkeypress="return validate(event)" OnClick="btnUpdate_Click" OnClientClick="return updatealert()" ForeColor="#003c71"></asp:Button>
im getting this error:
An exception of type 'System.NullReferenceException' occurred in App_Web_ol5f1rt3.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object