javascript and asp.net
-
I am still relatively new to programming especially asp. I am curious what is the recommended way or perhaps ways to integrate Javascript with Asp.net? I guess I should clarify this. I am working on a test project of a calculator where I would have all of the buttons except for the operation buttons work on javascript. The operation buttons (i.e. add subtract sqrt etc) would run on asp on the server. I have written a complete Javascript calculator and a complete asp calculator but this one seems to me a lot more challenging.
-
I am still relatively new to programming especially asp. I am curious what is the recommended way or perhaps ways to integrate Javascript with Asp.net? I guess I should clarify this. I am working on a test project of a calculator where I would have all of the buttons except for the operation buttons work on javascript. The operation buttons (i.e. add subtract sqrt etc) would run on asp on the server. I have written a complete Javascript calculator and a complete asp calculator but this one seems to me a lot more challenging.
AJAX.NET could be a nice way to do this.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
-
I am still relatively new to programming especially asp. I am curious what is the recommended way or perhaps ways to integrate Javascript with Asp.net? I guess I should clarify this. I am working on a test project of a calculator where I would have all of the buttons except for the operation buttons work on javascript. The operation buttons (i.e. add subtract sqrt etc) would run on asp on the server. I have written a complete Javascript calculator and a complete asp calculator but this one seems to me a lot more challenging.
I agree that you would do well to look at AJAX, but not necessarily AJAX.NET. It's very good, but (like other "black box" solutions such as jQuery) is a) all too often used in a way that is like using a sledgehammer to crack a nut (as in this sort of scenario) and b) you won't really learn very much. As your stated goal is to learn, I would suggest you research how to write your own AJAX scripts for this exercise. Here[^] might be a good place to start.
-
I am still relatively new to programming especially asp. I am curious what is the recommended way or perhaps ways to integrate Javascript with Asp.net? I guess I should clarify this. I am working on a test project of a calculator where I would have all of the buttons except for the operation buttons work on javascript. The operation buttons (i.e. add subtract sqrt etc) would run on asp on the server. I have written a complete Javascript calculator and a complete asp calculator but this one seems to me a lot more challenging.
The buttons that do stuff on the server should be server controls asp:Button. The buttons that do something only on the client should be <button>. Anything that needs to be reference by both, like the calculator readout should be server controls and your javascript functions can refer to them using document.getElementById('<%=yourControlName.ClientID %>').