Hi, I am facing a problem that's driving my crazy for sometime. I have an asp .net mvc page(.ascx). This view has a form which can be ajax submitted to a controller action. I have an ajax submit button that posts the form.
In the view I have some if conditions as follows
If(Model.SampleID.HasValue) { alert('sample created'); alert(''); }
This code works fine when I hit the ajax submit button, I mean the javascript gets executed. But when I hit the enter key, the same post happens but the javascript code is not executed at all. I don't know why this happens.
Any thoughts or comments?