Call procedure from aspx

  • Thread starter Thread starter simonZ
  • Start date Start date
S

simonZ

How can I call sub from aspx page?

If I have on aspx page grid view and I call procedure from item Template:
<asp:GridView ...
....
<ItemTemplate>
<%# test()%>

and in code behind:
protected String test()
{
}

I get an error:
cannot convert from 'void' to object.

Any idea?

Thanks,S
 
Why don't you use the object oriented, event driven power of ASP.net rather
than tring to do things procedurally. e.g. put an object in the itemtemplate
and then set a property of it in the relevent event handler.
 
Back
Top