AW: [mono-vb] Inherits in VB ASP.NET

Jambunathan Jambunathan kjambunathan@novell.com
Mon, 11 Oct 2004 23:39:40 -0600


Hello

As the implementation of ":" is not yet complete, you can,
for now, use an "actual end of line" instead of ":" as the
terminator.

So replace,

Public Class viewAllRecords : Inherits System.Web.UI.Page

with
 Public Class viewAllRecords 
                        Inherits System.Web.UI.Page

I have made a note of this scenario in mbas test cases.

I appreciate you taking time to report this.

Regards,
Jambunathan K.

>>> "Tue Doan Nguyen" <minhtue@saigonnet.vn> 10/11/04 9:38 PM >>>
THIS IS THE CODE SNIPPET
-----------------
Imports System

Imports System.Data

Imports System.Data.OleDB

Imports System.Configuration

Imports System.Web.UI.WebControls

Imports System.Web.UI.HtmlControls

Imports dotForumIncludes

Namespace dotForumClientTopic

Public Class viewAllRecords : Inherits System.Web.UI.Page

Public myIncludes As New includeFunctions

Protected dotForumDisplay As System.Web.UI.WebControls.DataGrid

Protected messageCenter As
System.Web.UI.HtmlControls.HtmlGenericControl

Protected threadLink As System.Web.UI.HtmlControls.HtmlGenericControl


Public pageTitle As String = " .: ITCN Asp.Net Forum 2004 :. "

Public pageDesc As String = "ITCN Asp.Net Forum 2004"

Public pageKeys As String = ".net, asp.net, asp, visual basic,
microsoft,
itcn, programming, server, clr, net, discussion, forum, discussion
board,
free, source code, open source"

Sub Page_Load(sender as Object, e as EventArgs)

If Not Page.IsPostBack then

bindData()

End If

End Sub



Sub bindData()

Dim myConnection as New
oleDBConnection("Provider=SQLOLEDB;server=localhost;uid=sa;pwd=;database=For
um200412")

Dim myCommand as New oleDBCommand("SELECT bcId, Left(bcTitle, 100) As
bcTitle, bcDesc, bcOrder, bcLastUpdate, bcLock FROM forumTopics ORDER
BY
bcOrder, bcLastUpdate DESC", myConnection)

Dim myDA as New oleDBDataAdapter()

myDA.SelectCommand = myCommand

Dim myDS as New DataSet()

myDA.Fill(myDS)


dotForumDisplay.DataSource = myDS

dotForumDisplay.DataBind()

'### CHANGE THE FOLDER IMAGE BASED ON ATTRIBUTES

Dim gridrow As DataGridItem

Dim folderString As String

Dim folderAltString As String

Dim thisDate As Date

Dim currentDate As Date = Microsoft.VisualBasic.Format(DateTime.Now,
"MM-d-yyyy")

For Each gridrow In dotForumDisplay.Items

If CType(gridrow.FindControl("bcLock"), HtmlInputHidden).Value = "y"
Then

folderString = "gfx/forum/folder_locked"

folderAltString = ", Locked"

Else

folderString = "gfx/forum/folder"

folderAltString = ""

End If

thisDate = CType(gridrow.FindControl("bcLastUpdate"),
HtmlInputHidden).Value

If Microsoft.VisualBasic.Format(thisDate, "MM-d-yyyy") = currentDate
Then

folderString = folderString & "_new.gif"

folderAltString = folderAltString & ", New Activity"

Else

folderString = folderString & ".gif"

End If

CType(gridrow.FindControl("folderImage"), Image).ImageUrl =
folderString

CType(gridrow.FindControl("folderImage"), Image).AlternateText =
CType(gridrow.FindControl("bcTitle"), HyperLink).Text &
folderAltString

Next

'### DISABLE NEXT/PREV IF LESS THAN dotForumDisplay.PageSize

If myDS.Tables(0).Rows.Count < dotForumDisplay.PageSize Then
dotForumDisplay.PagerStyle.Visible = False

End Sub



Sub dotForumDisplay_Paged(sender as Object , e as
DataGridPageChangedEventArgs)

dotForumDisplay.CurrentPageIndex = e.NewPageIndex

bindData()

End Sub

End Class



End Namespace

----------------------------------------------------

AND  THIS IS THE ERROR MESSAGE


--------
MonoBASIC: THIS IS STILL ALPHA AND UNSUPPORTED SOFTWARE, USE AT YOUR
OWN
RISK.
--------
syntax error, got token `COLON', expecting EOL
forum.aspx.vb(11,26) error BC29999: Parsing error
Compilation failed: 1 Error(s), 0 warnings

------------------------------------------------------

IF I CLEAR THE COLON ":", THE ERROR BECOMES:

--------
MonoBASIC: THIS IS STILL ALPHA AND UNSUPPORTED SOFTWARE, USE AT YOUR
OWN
RISK.
--------
syntax error, got token `INHERITS', expecting EOL
forum.aspx.vb(11,33) error BC29999: Parsing error
Compilation failed: 1 Error(s), 0 warnings

Thanks