There seriously has to be a better way to do this than what I'm finding on the net.
<script type="text/javascript">
function Sub()
{
if (document.getElementById("DatePicker1").Text == "")
alert("Select a date");
else
Submit(); //this is the c# function
}
</script>
<asp:Button ID="Button1" runat="server" OnClientClick="Sub()" PostBackUrl="~/Default.aspx" Text="Submit" />
Why is it that if I changed it to OnClick = "Submit" I could do that, but trying to do it after clientside validation its so hard! Very frustrating. I'm a pretty experienced programmer, but new to web related stuff so this while client vs server nonsense keeps getting in the way.
Please let me know of any good solutions. I'd rather not use jQuery as I want to study that separately later. Thank you.