Q: Eval and casting.

  • Thread starter Martin Arvidsson, Visual Systems AB
  • Start date
M

Martin Arvidsson, Visual Systems AB

Hi!

I have a webpage with a DataGrid and a codebehind file containing a method
called OrderStatusText

The line in question in the asp page
<ItemTemplate>

<%# OrderStatusText((byte)Eval("OSTATUS")) %>
</ItemTemplate>

I got the message: Specifyed cast not valid when i ran the page

The method looks like

public string OrderStatusText(byte status)
{
do stuff
return stuff
}

Any idea why it's not possible?

I got the cast code from the msdn2 pages.

Regards
Martin
 
A

Andrea Zani

Martin Arvidsson, Visual Systems AB ha scritto:
The line in question in the asp page
<ItemTemplate>

<%# OrderStatusText((byte)Eval("OSTATUS")) %>
</ItemTemplate>


Any idea why it's not possible?

You can write:
Regards
Martin

Bye
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top