OnClientClick doesnt work in Formview asp.net

I am working in asp.net vb.net. I have a datagrid with a update button like this : OnClientClick="return ('Succesfully updated!')"> Which works like a charm.

And I have this one in the formview:

OnClientClick="return ('Succesfully edited!')">

Its exactly the same button as in the gridview, but it doesnt seem to work? Complete buttons:

      <asp:Button 
        ID="ButtonUpdate" 
        runat="server" 
        CssClass="details"
        CausesValidation="True" 
        CommandName="Update" 
        Text="Update"
        OnClientClick="return
        ('Succesfully updated')">
    </asp:Button>

The other one is exactly the same but with different text and a other ID

Answers


I think you are try to fire alert() function on client click try this:

<asp:Button ID="ButtonUpdate" runat="server" 
        CssClass="details"
        CausesValidation="True" 
        CommandName="Update" 
        Text="Update"
        OnClientClick="javascript:alert('Succesfully updated');"></asp:Button>

Need Your Help

Safer way to process form in php?

php security overflow

Is it safe to do smth like this in first if on the page ctype_digit(base64_decode(trim($_POST['id']) or i should first create variable inside if and assign trim($_POST['id']) to it because they might