<script type="text/javascript"> var retValue = false; function ValidateBlock() { var txtBlockName = $("input[attr-identity=txtBlockName]").val(); // txtBlockName = replaceSpace(txtBlockName); if (txtBlockName == "") { alert("Please Enter Block Name"); $("input[attr-identity=txtBlockName ]").val(''); $("input[attr-identity=txtBlockName ]").focus(); return false; } else { return true; } } </script>
<asp:Repeater ID="RepBlockEntry" runat="server" OnItemDataBound="RepBlockEntry_ItemDataBound"> <ItemTemplate>
<asp:TextBox ID="txtBlockName" MaxLength="15" runat="server" Text='<%#Eval("BlockName") %>' OnTextChanged="txtBlockName_TextChanged" AutoPostBack="false" attr-identity="txtBlockName"></asp:TextBox>
</ItemTemplate> <FooterTemplate> </FooterTemplate> </asp:Repeater>
<asp:Button ID="btnSaveBlock" runat="server" Text="Save" Visible="false" CssClass="addbutton" ValidationGroup="BlockEntry" OnClick="btnSubmitBlock_Click" OnClientClick="return ValidateBlock();" />
<div> <ul> <li>foo</li> <li>bar</li> </ul> </div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)