13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14<strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong>: A Beginner’s <strong>Guide</strong><strong>ASP</strong>.<strong>NET</strong> is one of the main frameworks provided by the .<strong>NET</strong> framework. The same<strong>ASP</strong>.<strong>NET</strong> forms that are integrated into a VB.<strong>NET</strong> program can be developed with J#,JScript.<strong>NET</strong>, or C#. All are processed using the .<strong>NET</strong> framework. So once you learn howto develop applications in one language, such as C#, you will find development in theother languages very simple and similar.Development ContextsIf you’ve never developed server-side applications, the process may appear daunting, butit’s really not. You can develop in a simple HTML environment, adding both C# scriptsand <strong>ASP</strong>.<strong>NET</strong> forms. In the Dreamer.aspx example, we could have developed the C#script within the same context as the HTML code and <strong>ASP</strong>.<strong>NET</strong> forms. For example, thefollowing code in the HTML page would do the same thing as the Dreamer.aspx.cs file:protected void DoDream(object sender, EventArgs e){Dreams.Text = DreamBox.Text + "'s dreams are big!";}…rest of <strong>ASP</strong>.<strong>NET</strong> pageTo make it easier to learn, however, this book will use the code generated when you useVisual Studio 2008 as a development tool. If you prefer to use another tool, feel free to doso. In the next chapter, you will see how to use Visual Studio 2008 and to provide code byuse of alternative tools—including tools as simple as Microsoft’s Notepad.Running <strong>ASP</strong>.<strong>NET</strong> Files on Your Computer or LANWhen you save a file as an <strong>ASP</strong>X file, you can save the C# right in the file with the<strong>ASP</strong>.<strong>NET</strong> forms using the tags, or you can use the code-behind methoddescribed earlier. This does not mean that you can just place <strong>ASP</strong>X files and the codebehind C# files on a web server and everything will work. You need to place your files onthe right kind of hosting service running IIS7, which can be your very own <strong>com</strong>puter.You can do this on your own <strong>com</strong>puter where you have Visual Studio 2008 set up, soyou’re not faced with an “either/or” alternative. You can have the best of both worlds.Installing and Using an IIS7 Server on Your SystemIf you want to work with a more realistic environment with the files you create either withVisual Studio 2008 or some other tool, you can set up a working <strong>ASP</strong>.<strong>NET</strong> system right on

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!