Shruti Agarwal
Shruti Agarwal

Reputation: 897

Button in asp.net doesn't work sometimes

I have a textbox and a button in my code.The button when clicked should validate the value entered in the textbox.The button most of the times does it but at times doesn't do anything at all.Any help would be appreciated.

<asp:Button ValidationGroup="vgpPno" runat="server" ID="btnSubmitPartNumber" OnClick="btnSubmitPartNumber_Click" SkinID="MSWButton" Text="OK" OnClientClick="if(Page_ClientValidate(){startPLI();}meta:resourcekey="btnSubmitPartNumberResource1" /> 

 <asp:TextBox runat="server" ValidationGroup="vgpPno" SkinID="MSWTextBox"
  ID="tbPARTNUMBER" MaxLength="11" meta:resourcekey="tbPARTNUMBERResource1" Width="230" Style="display: inline" CssClass="form-control input-sm"></asp:TextBox>

Upvotes: 0

Views: 260

Answers (2)

Bhanu Pratap
Bhanu Pratap

Reputation: 1761

 <asp:Button ValidationGroup="vgpPno" runat="server" ID="btnSubmitPartNumber" OnClick="btnSubmitPartNumber_Click" SkinID="MSWButton" Text="OK" 
            OnClientClick="if(Page_ClientValidate(){startPLI();}meta:resourcekey='btnSubmitPartNumberResource1'" />

Upvotes: 1

Wenson
Wenson

Reputation: 235

Check Your web Form. If you are using form tag more then one time asp.controls not working properly

Upvotes: 0

Related Questions