Author: admin

  • ASP.NET Web Pages – Databases

    What We Will Do In this chapter we will: Displaying Data from Database With Web Pages, you can easily display data from a database. You can connect to an existing database, or create a new database from scratch. In this example we will connect to an existing SQL Server Compact database. Adding a Customers Page…

  • ASP.NET Web Pages – Files

    Working with Text Files Sometimes you will want to access data stored in text files. Text files used to store data is often called flat files. Common flat file formats are .txt, .xml, and .csv (comma-delimited values). In this chapter you will learn: Add a Text File Manually In the example to follow, you will…

  • ASP.NET Web Pages – Objects

    The Page Object You have already seen some Page Object methods in use: @RenderPage(“header.cshtml”) @RenderBody() In the previous chapter you saw two Page Object properties being used (IsPost, and Request): If (IsPost) { if (Request[“Choice”] != null) { Some Page Object Methods Method Description href Builds a URL using the specified parameters RenderBody() Renders the…

  • ASP.NET Web Pages – HTML Forms

    Creating an HTML Input Page Razor Example Razor Example – Displaying Images Suppose you have 3 images in your image folder, and you want to display images dynamically by the users choice. This is easily done by a little Razor code. If you have an image called “Photo1.jpg” in your images folder on your web…

  • ASP.NET Web Pages – Global Pages

    Before Web Startup: _AppStart Most server side code are written inside individual web pages. For example, if a web page contains an input form, the web page typically contains server code for reading the data. However, by creating a page named _AppStart in the root of your site, you can have startup code executed before…

  • ASP.NET Web Pages – Folders

    This chapter is about folders and folder paths. In this chapter you will learn: Logical Folder Structure Below is a typical folder structure for an ASP.NET web pages web site: Physical Folder Structure The physical structure for the “Images” folder at the website above might look like this on a computer: C:\Johnny\Documents\MyWebSites\Demo\Images Virtual and Physical…

  • ASP.NET Web Pages – Page Layout

    With Web Pages it is easy to create a web site with a consistent layout. A Consistent Look On the Internet you will discover many web sites with a consistent look and feel: With Web Pages this can be done very efficiently. You can have reusable blocks of content (content blocks), like headers and footers,…

  • ASP.NET Web Pages – Adding Razor Code

    ASP.NET Web Pages use Razor markup with C# or VB code Razor Markup Razor is a simple markup syntax for embedding server code (C# or VB) into ASP.NET web pages. Example The page above contains both ordinary HTML markup and Razor markup. Razor Syntax for C# C# Example Razor Syntax for VB VB Example More About C#…

  • ASP.NET Web Pages 

    Easy Learning with “Run Example” Our “Run Example” tool displays the ASP.NET code and the HTML output simultaneously. Click on the “Run Example” button to see how it works: Web Pages Example <html><body>     <h1>Hello Web Pages</h1>     <p>The time is @DateTime.Now</p></body></html> Run Example » ASP.NET Web Pages Web Pages is one of many programming models for creating ASP.NET web…

  • ASP and ASP.NET Tutorials

    ASP stands for Active Server Pages ASP is a development framework for building web pages. ASP supports many different development models: The ASP Technology ASP and ASP.NET are server side technologies. Both technologies enable computer code to be executed by an Internet server. When a browser requests an ASP or ASP.NET file, the ASP engine reads the file,…