Newbie, error between asp.net 1.1 and asp.net 2.0

Newbie, error between asp.net 1.1 and asp.net 2.0

Post by verc » Fri, 09 Feb 2007 18:14:48


i guys, sorry if this seems stupid :(

I'm running VS2005 Professional, SQL Server Express 2005, Win XP Pro SP2,
ASP.net 2.0, thanks in advanced for your help.

I trying to migrate an application build on asp.net 1.1 to
asp.net 2.0, I get an error saying:

Public member 'Format' on type 'Date' not found.

for this line in my code
<asp:label text='<%# Container.DataItem.CREATED_DT.Format("G",Nothing) %>'
runat="server" />

Below is the complete aspx form, and i've marked the block of code that i've
issues with.

***************************Forum_view.aspx****************************
<%@ Page Language="VB" MasterPageFile="~/Default.master"
AutoEventWireup="false" CodeFile="Forum_view.aspx.vb" Inherits="Forum_view"
title="Untitled Page" Strict="false" %>

<%@ Register TagPrefix="Club" TagName="AnimationSmall"
Src="Animation_Small.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<div id="body">

<Club:AnimationSmall ID="Animation1" runat="server" />

<div class="fullwidth">

<asp:label id="forum_name" font-bold="True" font-size="20px" runat="server"
/><hr />

<asp:hyperlink id="post_new" text="Nuevo Mensaje" runat="Server" />

<br /><br />

<asp:hyperlink id="link_previous" text="<<Anterior" runat="server" />

 | 

<asp:hyperlink id="link_next" text="Siguiente>>" runat="server" /><br
/>

<asp:repeater id="forum_view1" runat="Server">

<HeaderTemplate>

<asp:label font-bold="True" font-size="18px" runat="server" text="Lista de
Temas" /><hr />

</HeaderTemplate>

<Itemtemplate>

*********** can you please show me what would be the correct syntax for this
block of code****************

<asp:hyperlink navigateurl='<%# "message_view.aspx?pid=" &
Container.DataItem.ID & "&fid=" & Request.QueryString("fid") & "&fname=" &
Server.UrlEncode(Request.QueryString("fname")) %>' text='<%#
Container.DataItem.SUBJECT %>' runat="Server" /> 

(<asp:hyperlink navigateurl='<%# "mailto:" & Container.DataItem.EMAIL%>'
text='<%# Container.DataItem.NICKNAME %>' runat="Server" />) 

<asp:label text='<%# Container.DataItem.CREATED_DT.Format("G",Nothing) %>'
runat="server" />

<asp:label text='<%# "(" & Container.DataItem.REPLY_CNT & " responses)" %>'
runat="server" />
*******************************************************************************************
<br />

</Itemtemplate>

<AlternatingItemTemplate>

<asp:panel backcolor="lightskyblue" runat="server">

<asp:hyperlink navigateurl='<%# "message_view.aspx?pid=" &
Container.DataItem.ID & "&fid=" & Request.QueryString("fid") & "&fname=" &
Server.UrlEncode(Request.QueryString("fname")) %>' text='<%#
Container.DataItem.SUBJECT %>' runat="Server" /> 

(<asp:hyperlink navigateurl='<%# "mailto:" & Container.DataItem.EMAIL%>'
text='<%# Container.DataItem.NICKNAME %>' runat="Server" />) 

<asp:label text='<%# Container.DataItem.CREATED_DT.Format("G",Nothing) %>'
runat="server" />

<asp:label text='<%# "(" & Container.DataItem.REPLY_CNT & " responses)" %>'
runat="server" />

</asp:panel>

</AlternatingItemTemplate>

<FooterTemplate>

<hr
 
 
 

Newbie, error between asp.net 1.1 and asp.net 2.0

Post by Teemu Keis » Wed, 14 Feb 2007 01:48:32

ounds like you'd be migrating to the web site project model which is
significantly different from the project model in VS2003.
Migration would be easier if you'd migrate to VS2005 Web Application Project

see:
http://www.eps-publishing.com/Article.aspx?quickid=0609061 (esp page 6)

http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"verci" < XXXX@XXXXX.COM > wrote in message
news:% XXXX@XXXXX.COM ...