function check() { if (freetextboxEmpty() && textboxEmpty()) { if (confirmation()) { return true; } } return false; } function freetextboxEmpty() { var x = document.getElementById('<%=FreeTextBox1.ClientID%>').value; if (x == '') return false; else return true; } function textboxEmpty() { var x = document.getElementById('<%=Sub_txt.ClientID%>').value; if (x == '') return false; else return true; }
OnClientClick
freetextboxEmpty()
textboxEmpty()
<asp:Button ID="Save_btn" runat="server" Text="save" CssClass="Initial" onclick="Save_btn_Click" Width="100px" OnClientClick="return check();" /> <asp:MultiView ID="MainView1" runat="server"> <asp:View ID="View11" runat="server"> <asp:TextBox ID="Sub_txt" runat="server" Font-Size="Larger" Height="35px" Width="95%"></asp:TextBox> </asp:View> <asp:View ID="View12" runat="server"> <asp:TextBox ID="FreeTextBox1" runat="Server"/> </asp:View> </asp:MultiView>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)