473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

display html on web page

Probably very simple question since I am new in Dot Net....

I have a DisplayHtml function in moudle1.vb which is:

Function DisplayHtml(ByRef fstrText As String)

' replace line break with <br> in html

fstrText = Replace(fstrText, Chr(10), "<br>")

'fstrText = Replace(fstrText, Chr(13), "<br>")

Return fstrText

End Function
I have the following on apsx page...

<%# DisplayHtml(DataBinder.Eval(Container.DataItem, "Content"))%>
Of course you know what I want to do... I want to change link break to Html
code < br>.

However, I met an error of "Compiler Error Message: BC30451: Name
'DisplayHtml' is not declared."

Where can I look for the error? What did I do wrong???
--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

Nov 18 '05 #1
5 1348
Hello Guoqi,
However, I met an error of "Compiler Error Message: BC30451: Name
'DisplayHtml' is not declared."


Is DisplayHtml defined in the ASPX's code-behind? An ASPX page generates a subclass of your code-behind class and if the method isnt available there, that would lead to your error.

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #2
It could be the accessibility of the function (though I don't know VB.NET so
well, especially how the accessibility defaults).
The function must be accessible to the aspx page, which is inherited from
the aspx.vb codebehind class. I presume it defaults to private, and it needs
to be at least protected.

Pete Beech

"Guoqi Zheng" <no@sorry.nl> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
Probably very simple question since I am new in Dot Net....

I have a DisplayHtml function in moudle1.vb which is:

Function DisplayHtml(ByRef fstrText As String)

' replace line break with <br> in html

fstrText = Replace(fstrText, Chr(10), "<br>")

'fstrText = Replace(fstrText, Chr(13), "<br>")

Return fstrText

End Function
I have the following on apsx page...

<%# DisplayHtml(DataBinder.Eval(Container.DataItem, "Content"))%>
Of course you know what I want to do... I want to change link break to Html code < br>.

However, I met an error of "Compiler Error Message: BC30451: Name
'DisplayHtml' is not declared."

Where can I look for the error? What did I do wrong???
--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

Nov 18 '05 #3
What do you mean by code-behind... DisplayHtml function is available on
Mudule... I didn't put anything on .aspx.vb file... What should I put
there???
--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

"Matt Berther" <mb******@hotmail.com> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...
Hello Guoqi,
However, I met an error of "Compiler Error Message: BC30451: Name
'DisplayHtml' is not declared."
Is DisplayHtml defined in the ASPX's code-behind? An ASPX page generates a

subclass of your code-behind class and if the method isnt available there,
that would lead to your error.
--
Matt Berther
http://www.mattberther.com

Nov 18 '05 #4
Hello Guoqi,
What do you mean by code-behind... DisplayHtml function is available
on Mudule... I didn't put anything on .aspx.vb file... What should I
put there???


Put your DisplayHtml method in the .aspx.vb file.

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #5
Specifically make it public, i had the same problem till I did that. Not
sure why, but it seemed to work for me.

HTH,
Sueffel
"Guoqi Zheng" <no@sorry.nl> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
Probably very simple question since I am new in Dot Net....

I have a DisplayHtml function in moudle1.vb which is:

Function DisplayHtml(ByRef fstrText As String)

' replace line break with <br> in html

fstrText = Replace(fstrText, Chr(10), "<br>")

'fstrText = Replace(fstrText, Chr(13), "<br>")

Return fstrText

End Function
I have the following on apsx page...

<%# DisplayHtml(DataBinder.Eval(Container.DataItem, "Content"))%>
Of course you know what I want to do... I want to change link break to Html code < br>.

However, I met an error of "Compiler Error Message: BC30451: Name
'DisplayHtml' is not declared."

Where can I look for the error? What did I do wrong???
--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
5
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
13
by: Benjamin Smith | last post by:
I am controlling the display status of a table row using the following code. <TR id="CCRow" style="DISPLAY:none"> Instead of hard coding "none" above, I would like to change that value using a...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
9
by: Edward | last post by:
IE6 only displays certain text on my site if you mouse over it (!). I reduced the HTML down to this code below which still shows this effect/bug. My temporary solution was to take out all the...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
1
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
1
by: fsalvador | last post by:
Hi, I need help with this. I am trying to figure it out but I can't. I have 2 pages. I would like to display in the second page the content of one class and hide the content of the other...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.