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.
 

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