ASP Button isn't working when OnClientClick is missing

onellabah

New Member
i generated a page with an ASP Button which loads another page. \[code\]<asp:Button ID="ServerCredentials" runat="server" Text="Server Credentials" Font-Names="Verdana" Font-Size="12px" OnClick="Credential_Click" Width="135px"/>\[/code\]Function which loads another page:\[code\] Protected Sub Credential_Click(ByVal sender As Object, ByVal e As System.EventArgs) Response.Redirect("~/WebPage/Booking/ExchangeServer.aspx") End Sub\[/code\]This code only works when i registered on the page with exchange data. when i am not registered, nothing happens.But if i put a onclientclick with any function, it works again. like this:\[code\]<asp:Button ID="ServerCredentials" runat="server" Text="Server Credentials" Font-Names="Verdana" Font-Size="12px" OnClientClick="return CheckDateVonBis()" OnClick="Credential_Click" Width="135px"/>\[/code\]what is the difference between onclick and onclientclick?how can i solve this problem?
 
Back
Top