Datalist w/FP2003

J

John K

The following ASPX page works just fine. I do have a question with FP2003
that I built it with. I don't know if what I have done is according to Hoyle
or if there is a configuration or compatibility problem. I'm putting this
message here just because it's a fifty-fifty shot here or in a FP newsgroup.

This is the scenario:

If I make (hand code) this file and don't enter the asp:datalist lines into
the body of the HTML section and I create the table in design view, the
table is created just fine. In design view I have all the typical
functionality to manipulate the table properties that is common to FP2003.
As soon as I edit in the lines, in code view, for the datalist control I
lose any ability to manipulate the table in design view.

Along the same lines, if I am in code view, with the code lines for the
datalist already editied into the file, and place my cursor at the point in
the code where the table must be and try to insert a table, the table gets
inserted into the code but the datalist lines go away.

My dilemma is I don't know if I have done something wrong or if there is a
problem with the software. As I said, the page works flawlessly. I don't
know if I can have a table as an item in a datalist in the way I have done
it, (even though it works just fine). The target is Standard Server 2003.

I'd like to have this correct even though it isn't for any crtical business
use etc.

I hope I have explained this properly. I'm not a programmer by any stretch
so keep it simple.

The code:


<%@ Page Language="VB"
Inherits="Microsoft.Office.FrontPage.DBInterface.DBInterfacePage"
Src="/_fpclass/fpdbnet.cs" %>
<%@ import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>

<script runat="server">
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" &
server.mappath("newfaminfo.mdb"))
dbconn.Open()
sql="SELECT * FROM results"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
results.DataSource=dbread
results.DataBind()
dbread.Close()
dbconn.Close()
end sub
</script>

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="canvas 1011">
<title>All Members</title>
</head>
<body>

<form runat="server">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.htm">Home</a> | <a href="Member%20Info.htm">Up</a></p>
<p>&nbsp;</p>
<asp:DataList id="results" runat="server">

<HeaderTemplate>
<b>Family Information</b>
</HeaderTemplate>

<ItemTemplate>
<br>
<table Border="1" bgcolor="white" cellpadding="2" cellspacing="2"
width="550">
<tr>
<td align="left" width="130" nowrap><b>First Name:</b></td>
<td><%# Container.DataItem( "FirstName" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Middle Name:</b></td>
<td><%# Container.DataItem( "MiddleName" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Last Name:</b></td>
<td><%# Container.DataItem( "LastName" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Street:</b></td>
<td><%# Container.DataItem( "StreetAddress" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>City:</b></td>
<td><%# Container.DataItem( "City" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>State:</b></td>
<td><%# Container.DataItem( "State" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Zip:</b></td>
<td><%# Container.DataItem( "Zip" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Home Phone:</b></td>
<td><%# Container.DataItem( "HomePhone" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Work Phone:</b></td>
<td><%# Container.DataItem( "WorkPhone" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Cell Phone:</b></td>
<td><%# Container.DataItem( "CellPhone" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Email Address:</b></td>
<td><%# Container.DataItem( "EmailAddress" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Date of Birth:</b></td>
<td><%# Container.DataItem( "DateofBirth" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Child Of:</b></td>
<td><%# Container.DataItem( "Child_Of" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Marital Status:</b></td>
<td><%# Container.DataItem( "MaritalStatus" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Spouse Name:</b></td>
<td><%# Container.DataItem( "SpouseName" )%></td>
</tr>
<tr>
<td align="left" width="130" nowrap><b>Children Names:</b></td>
<td><%# Container.DataItem( "ChildrenNames" )%></td>
</tr>
</table>
<br>

</ItemTemplate>

<SeparatorTemplate>
<hr>
</SeparatorTemplate>

</asp:DataList>
</form>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top