So right now it all looks pretty with ...
<button type="submit" runat="server" name="subscribe" id="Button1" class="link-button" onserverclick="saveListing">
Until it is time to validate the data before calling saveListing function codebehind开发者_开发问答 (in VB .Net).
How can true/false be return so that when true saveListing will be called, otherwise not?
Thank you.
add onclick='if(! validateFunction()) return false;
.
I can't recall correctly whether HTML button control had onclicentclick property. Surely, if the web control <asp:Button ...
it has a property OnClientClick
where you can give the same value above for this effect as well.
精彩评论