473,467 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dynamic VB Code Behind

pbb
Is it possible to retrieve VB code stored in SQL Server as text and execute
it in code behind in an ASP.Net app? I guess what I'm looking for is an
object that would have an Execute method that could be called and pass in
text for the VB code to be executed.
Nov 19 '05 #1
4 1820
Yeah, you could probabaly rig something up. Christophe has a sample that
does something similar. It might give you some ideas:

http://cfouquet.blogspot.com/

-Brock
DevelopMentor
http://staff.develop.com/ballen
Is it possible to retrieve VB code stored in SQL Server as text and
execute it in code behind in an ASP.Net app? I guess what I'm looking
for is an object that would have an Execute method that could be
called and pass in text for the VB code to be executed.


Nov 19 '05 #2
How about posting your actual requirements? While it is certainly possible,
it is a heck of a lot of trouble, processing, overhead in general, and more
or less breaks the .Net object model. If we can go back to your actual
business requirements, we can probably come up with a much better solution.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"pbb" <pb*@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Is it possible to retrieve VB code stored in SQL Server as text and
execute
it in code behind in an ASP.Net app? I guess what I'm looking for is an
object that would have an Execute method that could be called and pass in
text for the VB code to be executed.

Nov 19 '05 #3
pbb
Thanks for the reply. I'll take a look at the post.

"Brock Allen" wrote:
Yeah, you could probabaly rig something up. Christophe has a sample that
does something similar. It might give you some ideas:

http://cfouquet.blogspot.com/

-Brock
DevelopMentor
http://staff.develop.com/ballen
Is it possible to retrieve VB code stored in SQL Server as text and
execute it in code behind in an ASP.Net app? I guess what I'm looking
for is an object that would have an Execute method that could be
called and pass in text for the VB code to be executed.


Nov 19 '05 #4
pbb
Thanks for your reply. It seems like I've thought about needing this
capability at different times in different projects. The one that is on my
mind currently involves creating a control panel dynamically in a report
viewer program. I posted a request for this earlier today under the subject
'Dynamic Master/Detail Controls', but as I started abstracting the
requirements I started to see a more broad application.

In this case when the user selects which report they want to run from a ddl
then controls are created on the web page dynamically for each parameter in
the report (based on records stored in sql).

For example a report may require 2 ddl's for parameters - one for State and
another for City. My code will read from sql that it needs to create a ddl
and populate it with a list of states (also from a table in sql) and then
create another ddl and populate it with a list of cities (also from a table
in sql). The code I'm using to create the parameter controls is pretty
abstract so that it can pretty much create whatever kind of control I need
(i.e. ddl, textbox, calender, etc). The problem I'm running into now is that
I need to be able to populate ddl's based on selections the user makes. In
this example if the user selects a state from the State ddl I want to
repopulate the City ddl with a list of cities in the state selected.

If these were static controls I could just use the SelectedIndexChanged
event for the State ddl to repopulate the City ddl, so I thought if I could
'save' the SelectedIndexChanged event code in sql and send it to an Execute
method then this would meet my need. I'm open to any suggestions!

"Kevin Spencer" wrote:
How about posting your actual requirements? While it is certainly possible,
it is a heck of a lot of trouble, processing, overhead in general, and more
or less breaks the .Net object model. If we can go back to your actual
business requirements, we can probably come up with a much better solution.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"pbb" <pb*@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Is it possible to retrieve VB code stored in SQL Server as text and
execute
it in code behind in an ASP.Net app? I guess what I'm looking for is an
object that would have an Execute method that could be called and pass in
text for the VB code to be executed.


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: theComputer7 | last post by:
I cut down the code to make this half way understandable... I have read Data Grid girls caution about over use of dynamic controls. I truly believe what I am doing requires dynamically inserted...
1
by: | last post by:
Hi Guys, I am generating dynamic server controls using XML and XSLT. With this I am generating two buttons which when clicked redirect the page to a different page. Here is my "checkout"...
4
by: Yan Wang | last post by:
Hi!: I encounter this problem when I do some tests: I have one user control with datalist in it. The ID for datalist is "dlTest". Then in this control code behind class, I declare a protected...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
5
by: RA | last post by:
I have created a button dynamically; which has been added to a TableCell of a TableRow of a Table control. Is there a way to add onclick event which calls a procedure on the Server-side itself....
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
2
by: czuvich | last post by:
All, I was wondering if it was possible to change a css class on a page load (somehow). Basically, I am wanting to say this: <div id="myclass" class="a javascriptfunction"> Is this...
3
by: Peter K | last post by:
Hi I need to make a list of "download file links" on a webpage. All the data is dynamic - it depends on the user's actions how many files, and which files, I need to present in the list. The...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.