Chapter 1 |
| I am attempting to execute the very first example of the book
(Step By Step 1.1). However, I am getting the following script runtime
error when trying to browse to an ASPX page: expected ; in line 6 char 9 If you get the above mentioned script runtime error when trying to browse to an ASPX page, the most likely reason is that the ASP.NET file extension are not properly registered with Internet Information Services (IIS). This normally happens if you install IIS after installing the .NET Framework/Visual Studio .NET. You may be able to fix this problem by registering the ASP.NET
extensions with IIS. To do this, issue the following command |
Chapter 4 |
| I get an exception when trying to run Step By Step 4.8. What's
the solution? Exception occurs because ASP.NET do not have
access to create necessary registry entries to create an event source.
There are a few ways to overcome this problem: |
Chapter 5 |
| Step By Step 5.12 has an annoying feature - after you click on a
master record, it populates a child table at the bottom of the screen,
but you have to scroll way down to see it. Is there any way to directly
navigate to the child table? Yes, there is a way to achieve this
functionality. However, this will require the use of client-side
JavaScript code. To make the changes, find this line of code in method
ShowDetailGrid() : |
| On page 386, there is a note that suggests the use of explicit
casts over DataBinder.Eval() method for improving performance.
However, when I modify Step By Step 5.19 to use explicit cast as
follows: <td><%# String.Format("{0:c}",((DataRowView)Container.DataItem)["Freight "])%></td> I get a compilation error with the following message: Compiler Error Message: CS0246: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?) How do I resolve this problem? The reason for this problem is that the compiler cannot resolve the reference to the DataRowView class, which belongs to the System.Data namespace. There are at least two techniques to solve this problem. Technique 1: Use the fully qualified type name. For example use the
following code: Technique 2: Use the @Import directive in your page. For example,
include this: Now, the compiler will attempt to look for types in the above
namespace and you can continue coding like this: Note that to import multiple namespaces, you need to use multiple @Import directives in your page. |