467,923 Members | 1,436 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

Executing a dynamically built statement

Is there a way to execute a statement that is built
dynamically by a .NET application.

For example I have a loop that is reading values from a
database and I want to do something like the following.

Dim stringa as string = "response.write somavalue"
Execute(stringa)

I realize this is not the best way to do this but it is
for a very specific need.

Does anyone know of a way to do something like this.

Thanks
Jul 21 '05 #1
  • viewed: 1565
Share:
1 Reply
This can be done using CodeDom and Reflection. A few months ago a wrote an
article about how this could be accomplished. You can find it here:
http://www.microsoft.com/belux/nl/ms.../datagrid.mspx

I recommend you take a look at the code, if you have further questions,
please let me know!

Jan

"Mark" <an*******@discussions.microsoft.com> schreef in bericht
news:00****************************@phx.gbl...
Is there a way to execute a statement that is built
dynamically by a .NET application.

For example I have a loop that is reading values from a
database and I want to do something like the following.

Dim stringa as string = "response.write somavalue"
Execute(stringa)

I realize this is not the best way to do this but it is
for a very specific need.

Does anyone know of a way to do something like this.

Thanks

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

By using this site, you agree to our Privacy Policy and Terms of Use.