Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Function calling (newbie?)

Reply
Thread Tools

Function calling (newbie?)

 
 
Gmansky
Guest
Posts: n/a
 
      06-27-2004
I am having difficulty trying to output a function that I created on the
codeblock of my aspx page.

I have a
function displaytext(mytext as string)
displaytext = replace(mytext, vbcrlf, "<br>")
end function

I'm getting an error when I use this on the html side
<td>
<%# displayText(<%#container.dataitem('Description')%> ) %>
</td>

What is the correct way of calling a function and passing a data from the
repeater?

Thanks,
George





 
Reply With Quote
 
 
 
 
EijiTek
Guest
Posts: n/a
 
      06-27-2004
Take the function call out of the server side databind tag, you've already
instructed the server to process the data. Also, make sure that you're
calling Page.DataBind().

If these suggestions don't work, please post more information such as the
actual error you're receiving and more of the page code.

"Gmansky" <(E-Mail Removed)> wrote in message
news:eWA$(E-Mail Removed)...
> I am having difficulty trying to output a function that I created on the
> codeblock of my aspx page.
>
> I have a
> function displaytext(mytext as string)
> displaytext = replace(mytext, vbcrlf, "<br>")
> end function
>
> I'm getting an error when I use this on the html side
> <td>
> <%# displayText(<%#container.dataitem('Description')%> ) %>
> </td>
>
> What is the correct way of calling a function and passing a data from the
> repeater?
>
> Thanks,
> George
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Craig Deelsnyder
Guest
Posts: n/a
 
      06-27-2004
On Sun, 27 Jun 2004 08:41:13 -0700, Gmansky <(E-Mail Removed)> wrote:

> <td>
> <%# displayText(<%#container.dataitem('Description')%> ) %>
> </td>


I think this may be what the other response is trying to say (wasn't sure):

<td>
<%# displayText(container.dataitem('Description')) %>
</td>

note the removed 'inner bind statement'...doesn't work that way

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
 
Reply With Quote
 
EijiTek
Guest
Posts: n/a
 
      06-27-2004
Yeah, that's exactly what I was saying. I should have posted the code.
Sorry!

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
newspr99w6rg775dg5d@cowboy...
> On Sun, 27 Jun 2004 08:41:13 -0700, Gmansky <(E-Mail Removed)> wrote:
>
> > <td>
> > <%# displayText(<%#container.dataitem('Description')%> ) %>
> > </td>

>
> I think this may be what the other response is trying to say (wasn't

sure):
>
> <td>
> <%# displayText(container.dataitem('Description')) %>
> </td>
>
> note the removed 'inner bind statement'...doesn't work that way
>
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET



 
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
calling a function via a pointer-to-function NoWonder C++ 2 04-09-2005 01:40 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
calling virtual function results in calling function of base class... Andreas Lagemann C++ 8 01-10-2005 11:03 PM
calling virtual function results in calling function of base class ... tiwy C++ 0 01-09-2005 11:17 PM
Calling a global function with the same name as a member function anoopsaha@gmail.com C++ 5 01-05-2005 09:40 AM



Advertisments