Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datalist w/FP2003

Reply
Thread Tools

Datalist w/FP2003

 
 
John K
Guest
Posts: n/a
 
      04-06-2004
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.D BInterfacePage"
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>
<aspataList 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>

</aspataList>
</form>

</body>
</html>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering DataList EditItemTemplate from Outside of the DataList Luis Esteban Valencia ASP .Net 1 01-06-2005 07:32 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd ASP .Net 1 05-26-2004 04:07 AM
DataList in DataList acko bogicevic ASP .Net 2 11-11-2003 08:31 AM
Datalist in Datalist How? Gönen EREN ASP .Net 0 08-22-2003 02:41 PM



Advertisments