PDA

View Full Version : Need Help.. New to ASP.net


sensitive
02-16-04, 08:06 AM
Hello!!

I am Using the Following code on the page:

-------------------------- Code Start -------------------------------
<%@ Import Namespace="System.Data" %>

<script runat="server">
sub Page_Load
if Not Page.IsPostBack then
dim mycdcatalog=New DataSet
mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
cdcatalog.DataSource=mycdcatalog
cdcatalog.DataBind()
end if
end sub
</script>

<html>
<body>

<form runat="server">
<asp:Repeater id="cdcatalog" runat="server">

<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Title</th>
<th>Artist</th>
<th>Company</th>
<th>Price</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td><%#Container.DataItem("title")%> </td>
<td><%#Container.DataItem("artist")%> </td>
<td><%#Container.DataItem("company")%> </td>
<td><%#Container.DataItem("price")%> </td>
</tr>
</ItemTemplate>

<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>
</form>

</html>
</body>

-------------------------- Code End -------------------------------

The Above code i got from the W3Schools Example. I had worked over aspClassic a lot and had used interdev as an IDE. In the INTERDEV when we writes code like "Set cn = Server." it displays all the properties and methods of the Server object. The same i am trying to do with
<%#Container.DataItem("price")%> code but when i place a "." after <%#Container it doesn't displays any functions or properties.

Please let me know why do is this happening..

Regards,
F.Ahmed.

Shane
03-16-04, 12:57 PM
Interdev does not have an ASP.NET parser. Also, the Visual Studio.net IDE doesn't allow page-level intellisense. You'll have to wait until the next version.

Interdev has been completely phased out.


Hello!!

I am Using the Following code on the page:

-------------------------- Code Start -------------------------------
<%@ Import Namespace="System.Data" %>

<script runat="server">
sub Page_Load
if Not Page.IsPostBack then
dim mycdcatalog=New DataSet
mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
cdcatalog.DataSource=mycdcatalog
cdcatalog.DataBind()
end if
end sub
</script>

<html>
<body>

<form runat="server">
<asp:Repeater id="cdcatalog" runat="server">

<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Title</th>
<th>Artist</th>
<th>Company</th>
<th>Price</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td><%#Container.DataItem("title")%> </td>
<td><%#Container.DataItem("artist")%> </td>
<td><%#Container.DataItem("company")%> </td>
<td><%#Container.DataItem("price")%> </td>
</tr>
</ItemTemplate>

<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>
</form>

</html>
</body>

-------------------------- Code End -------------------------------

The Above code i got from the W3Schools Example. I had worked over aspClassic a lot and had used interdev as an IDE. In the INTERDEV when we writes code like "Set cn = Server." it displays all the properties and methods of the Server object. The same i am trying to do with
<%#Container.DataItem("price")%> code but when i place a "." after <%#Container it doesn't displays any functions or properties.

Please let me know why do is this happening..

Regards,
F.Ahmed.