Parameter in function

  • Thread starter Thread starter simon
  • Start date Start date
S

simon

I have functions dll includet in my project and inside I have payment
function with integer parameter.
This works:

<ItemTemplate>
<%=functions.payment(1)%>
</ItemTemplate>

How can I include dataField instead of 1, something like this:
(this example doesn't work)

<ItemTemplate>

<%=functions.payment(DataBinder.Eval(Container.DataItem,"med_ID"))%>
</ItemTemplate>

Thank you,
Simon
 
You can use Convert.ToInt32()

e.g
<%=functions.payment(Convert.ToInt32(DataBinder.Eval(Container.DataItem,"med
_ID")))%>
</ItemTemplate>
 

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