Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.1
This is the forum to discuss the Wrox book Beginning ASP.NET 1.1 with Visual C#.NET 2003 by Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Daniel Maharry; ISBN: 9780764557088
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2004, 08:54 PM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why do I keep getting a blank page?

Im trying to implement the example in CH2 on page 61 in the ASP.NET 1.1 Book. All this example does is extract some data from an access database table and puts it into a datagrid on the web page.

My problem is every time I run this, it just gives me a blank page. It seems to compile and run with out any errors. I have copied the code right out of the book and just substituted a database that I had saved on my C drive instead of using there database.

Can anyone here help me with this? Does anyone have any suggestions or ideas? Im starting to pull my hair with this already.
Here is the code.

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="DataControlCH2.WebForm1" debug="True"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Oledb" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script language="vb" runat="server">
Sub Page_Load(Sender as Object, E as EventArgs)
    Dim myCNN as OleDbConnection
    Dim objCommand as OleDbDataAdapter
    Dim mySQL as string
    Dim strConnect as string
    Dim DataSet1 as DataSet
    strConnect= "Provider=Microsoft.Jet.OLEDB.4.0;"
    strConnect+= "Data Source=C:\Access Work\CompanyDatabase.mdb;"
    strConnect+= "Persist Security Info=False"
    mySQL= "Select SSN,FName,LName from Employee"
    myCNN= New OleDBConnection(strConnect)
    objCommand=New OleDBDataAdapter(mySQL,myCNN)
    objCommand.Fill(DataSet1,"Employee")
    DataGrid1.DataSource=DataSet1.Tables("Employee").D efaultView
    DataGrid1.DataBind()
End Sub
</script>
<HTML>
    <HEAD>
        <title>Data Grid Control Example</title>
        <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout" BGCOLOR="#ffffff">
        <form id="Form1" method="post" runat="server">
            <asp:DataGrid ID="DataGrid1" Runat="server" Height="344px" Width="376px" />
        </form>
    </body>
</HTML>

 
Old May 19th, 2004, 07:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try this and see if it fixes the problem:

1) Open a command window. (Click Start, click Run, type cmd, and then click OK.)
2) Navigate to the directory of the Aspnet_regiis.exe version you want to use. Remember that each version of the .NET Framework comes with its own version.

The file is usually located in the following directory:
for XP c:\windows\Microsoft.NET\Framework\<versionNumber>
for 2000 c:\winnt\microsoft.net\framework\<versionNumber>

Then type aspnet_regiis.exe -i


 
Old May 19th, 2004, 07:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Also note that setting the height of the datagrid might not display all of the table.

 
Old May 19th, 2004, 10:35 AM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the help.

I ran that regiis.exe and it successfully installed ASP.NET 1.1.
But it still did process the aspx page correctly.
When Installed IIS and Visual Studio about a year ago. From I remember I installed the whole Visual Studio first and now I found out that the IIS needs to be installed first.
Do you think I should uninstall both IIS and Visual Sudio and re-install them both. Starting with the IIS first? Do you think that might be causing the preblem?

Also do you know if I need any addition Service Packs?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank Struts page after submit simistef Struts 2 August 28th, 2007 12:46 AM
Blank Default Page ghrebek BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 December 5th, 2006 08:09 PM
why blank page? gilgalbiblewheel Classic ASP Databases 6 December 31st, 2004 09:30 PM
Every other page blank in PDF jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 6th, 2004 12:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.