I want a button that when the user clicks on it validates in both server side and client side regular expressions.

for example

<asp:Button ID="btnLogin" runat="server" onclick="C_Buttonk" onclick= "js_button" Text="Login" />

Then button would call both functions from JS and C# hence serverside and client side, but the problem is, it doesn't work!

How would I go around possibly doing this without it being too complicated, I just need a simple fix.

Thanks Olly

I found a solution, I just used onclintclick = "jsfunction()"!

very simple and easy solution.

Syntax goes like this

<asp:Button ID="btnLogin" runat="server" OnClick="C_Buttonk" OnClientClick="js_button()" Text="Login" />

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.