Problem: function call in <% %> pair using Container.DataItem("") as parameter

  • Thread starter Thread starter fig000
  • Start date Start date
F

fig000

Hi,

I have some code written into the html in a dot.net form:

<%if test(Container.DataItem("user_id")) =2%>

I've been able to use container.dataitem in these <%%> pairs as an
expression to provide values for clauses. I've also been able to call
functions as above, as long as I don't use Container.DataItem to pass
some value from the bound data to the function. If I do I get the
error:

Name 'Container' is not declared.

I've tried a number of different things but no success. Any help
would be appreciated.

Thanks,
Neil
 
I have seen you sand this messages to a lot of newsgroups, did you get your
answer already?

Cor
 
Cor,

I only sent this yesterday. I haven't gotten any answers yet.

Neil
 
Fig000,

The kind of code you are using is ASP code, which works on ASPNET.

However for most of us it is confusing, moreover because in ASPNET the code
in the non compiled version is as well rearanged, therefore the result is
that it is good readable and easy to show too others.

Maybe it is better that you have a look at this style of code which has a
good and also very deep explanation on this website.

http://samples.gotdotnet.com/quickstart/

And please do not multipost again (sending one messages to more newsgroups),
correct crossposting (sending one message to one newsgroup) is in dotnet
newsgroups well accepted when it is not clear for what is the subject. It
gives even the result that more people can see answers from others.

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top