jackjohnson44
asked on
asp.net call code inline
I have a dll and function call that I can call in my code behind. How do I do it inline? In this example, it just returns a string.
This is how I can do it in the code behind now. I can set the result string to a lable
using MyDom.Utilities.Classes;
string result = ResourceController.ReadRes ourceValue ("file", "key");
I want to be able to do this inline like:
<%= ResourceController.ReadRes ourceValue ("file", "key") %>
This is how I can do it in the code behind now. I can set the result string to a lable
using MyDom.Utilities.Classes;
string result = ResourceController.ReadRes
I want to be able to do this inline like:
<%= ResourceController.ReadRes
ASKER
Thanks, I can implement the first example, but when I try the second, the control doesn't load.
ASKER
Thanks, I am having issues and I am not sure what is wrong. I had this working using the full name, then tried the other and now nothing will work.
In my code behind, I can do the following in the onload:
string x = Fmg.Cti.UI.Utilities.Class es.Resourc eControlle r.ReadReso urceValue( "Riblet", "Riblet_Chicklet1_Button_t ext");
This works without issue.
In my aspx page (I didn't remove the code from the onload), I put this:
<%= Fmg.Cti.UI.Utilities.Class es.Resourc eControlle r.ReadReso urceValue( "Riblet", "Riblet_Chicklet1_Button_t ext")%>
When I do, I got an error:
error CS0234: The type or namespace name 'Cti' does not exist in the namespace 'Fmg' (are you missing an assembly reference?)
Again, I believe that I had this working. I am not sure why this is happening.
Thanks again for your help.
In my code behind, I can do the following in the onload:
string x = Fmg.Cti.UI.Utilities.Class
This works without issue.
In my aspx page (I didn't remove the code from the onload), I put this:
<%= Fmg.Cti.UI.Utilities.Class
When I do, I got an error:
error CS0234: The type or namespace name 'Cti' does not exist in the namespace 'Fmg' (are you missing an assembly reference?)
Again, I believe that I had this working. I am not sure why this is happening.
Thanks again for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Either:
Open in new window
Or:
Open in new window