ASP.Net Study Materials

Home > Preview

The flashcards below were created by user caldreaming on FreezingBlue Flashcards.

  1. Describe the steps to create a class in;
    To begin to create a class you must have a file in your project called 'app_code'.  You can either create this file manually in the solution explorer or you can have Visual Studio create one for you by selecting Web Site-> add new item->class  and then a message box appears asking whether you want to create the folder app_code.
  2. Describe the anatomy of a class in;
    • A class is a technique of using one or a group of variables to be used as a foundation for a more detailed variable. To create a class, you start with the class keyword followed by a name and its body delimited by curly brackets. Here is an example of a class called
    • Square:

    • class Square
    • {
    • }

    When a project is made of various files, each file is represented by a tab in the top section of the Code Editor. To access a file, you can click its tab. To assist you with managing the various classes of a project, Microsoft Visual Studio includes various tools and windows. One of the windows you can use is called the Class View. To display it, on the main menu, you can click View -> Class View.
  3. How do you declare a variable of a class type?
    • Like any normal variable, to use a class in
    • your program, you can first declare a variable for it. to declare a variable of a class, type its name followed by a name for the variable. For example, to declare a variable of the mentioned Square class, you could type the following:

    • void btnCalculate_Click(object sender, EventArgs e)
    • {   
    •           Square sqr;
    • }

    This is called a value variable because such variables of primitive types hold their value.
  4. After you declare a variable of a class type how do you use the variable as a reference?
    • The C# language supports another type of variable. This time, when you declare the variable, its name doesn't hold the value of the variable; it holds a reference to the address where the actual variable is stored in memory. This reference type is the kind used to declare a variable for a class.  To use a variable as reference, you must initialize it using an operator called new. Here is an example:
    • void btnCalculate_Click(object sender, EventArgs e)
    • {
    •        Square sqr;
    •        sqr = new GeoSquare();
    • }

    You can also use the new operator directly when declaring the variable as follows:

    • void btnCalculate_Click(object sender, EventArgs e)
    • {   
    •           Square sqr = new GeoSquare();
    • }
  5. What is the purpose of the global.asax.cs file?
    It is the entry point for web applications that are written on top of ASP.Net
  6. What is a DataSet?
    The DataSet is a memory-resident representation of data that provides a consistent relational programming model independent of the data source.  It represents a complete set of data that includes tables, constraints, and relationships among the tables. Because the DataSet is independent of the data source a DataSet can include data local to the application as well as data from multiple sources.  Interaction with existing data sources is controlled through the DataAdapter.
  7. What is a DataReader?
    You use the Read method of the DataReader once you obtain a data row from a query.  You can access each column of the returned row by passing the name or ordinal reference of the column to the DataReader.  The DataReader provides a series of methods that allow you to access column values in their native data types; GetDateTime, GetDouble, GetGuid, GetInt32 and so on.

Card Set Information

ASP.Net Study Materials
2015-12-13 00:22:23
ms microsoft asp net visual studio

Study materials for ASP.Net technologies
Show Answers:

Home > Flashcards > Print Preview