Unobtrusive Javascript rich text editor?

We’ve used the no-longer-supported RichTextBox control as part of our (ASP.NET-based) CMS for a long time, and we’d like to replace it with something lighter-weight and with better cross-browser support. We were originally looking at various ASP.NET components, but I’m wondering if we’d be better off just using an open-source, all-Javascript solution instead. I’m a … Read more

How to call a asp:Button OnClick event using JavaScript?

I have a question, I have a button like below: <asp:Button ID="savebtn" runat="server" OnClick="savebtn_Click" Visible="false" /> I then have HTML button like like below: <button id="btnsave" onclick="fncsave">Save</button> I have the javascript below: <script type="text/javascript"> function fncsave() { document.getElementById('<%= savebtn.OnClick %>').click() } </script> My question now is, how can I call the asp:Button OnClick from the … Read more

Correct way to reference Javascript in ASP.NET MVC?

What is the correct way to reference Javascript in ASP.NET MVC? Using something like ../../Scripts/Myscript.js seems to work fine for routes that are the traditional {controller}/{action}/{id}, but are more fragile for anything more or less complex than that. Of greater concern is that the rational absolute reference (/Scripts/Myscript.js) breaks Intellisense in Visual Studio.