I found
http://www.west-wind.com/presentations/dynamicCode/DynamicCode.htm
to be a pretty good reference on doing this.. put me right off the idea

You could also use the Script control (though you'll have to use vbscript or
javascript) - Add a reference to the COM \ Microsoft Script Control 1.0 and
do like..
<snip>
ScriptControl script = new ScriptControl();
script.Language = "vbscript";
script.AddObject("joe", new ken(), true);
Response.Write(script.Eval("(1 + 3) * joe.bob"));
</snip>
[ComVisible(true)]
public partial class ken
{
public int bob = 3;
}
...too easy!
Regards,
Eliott
| Thx
| I will try this
| And yes, I am generating code on the fly
| sw
|
| Gaurav Vaish (
www.EduJini.IN) wrote:
| > Are you generating C#/VB.Net code on the fly?
| > Yikes! Well... you would be needing
| > System.CodeDom.Compiler.CSharpCodeProvider or
| > System.CodeDom.Compiler.VBCodeProvider
| >
| > for the code to be compiled on the fly.
| >
| > But I am damn sure... there are better things around. May be you can
share
| > some more information about your website / application!
| >
| >
| > --
| > Happy Hacking,
| > Gaurav Vaish |
http://www.mastergaurav.org
| >
http://www.edujini.in |
http://webservices.edujini.in
| > -------------------
| >
| >
| > | > >I am building an application that is totally data driven. The pages are
| > > built from scratch at runtime.I have everything working fine. Now all
I
| > > need to do is to have the ability to add code both server-side and
| > > client-sie at runtime. I think I have pretttty much figured out the
| > > client side part. My problem is the servre-side code. How do i inject
| > > and/or run server-side code (frfom the database) at runtime?
| > >
|