function OfferValidationMenuItem() { var OfferPrice = document.getElementById("<%=textboxOfferPrice.ClientID %>").value; var actualPrice = document.getElementById("<%=LabelDisplayItemPrice.ClientID %>").innerText; if (OfferPrice >= actualPrice) { alert("Offer Price must Less than Item Price"); document.getElementById("<%=textboxOfferPrice.ClientID %>").focus(); return false; } }
It will work if you use innerHTML var actualPrice = document.getElementById("<%=LabelDisplayItemPrice.ClientID %>").innerHTML;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)