Compiling VB.NET Code at runtime
-
Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan
-
Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan
Yes, it's possible to do. No, it's not easy to understand. Only you can answer the third question. It all depends on what your doing. You'll come up with lots of artciles here on CP just by searching for "Codedom". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan
I think this is wht you need. http://www.divil.co.uk/net/articles/plugins/scripting.asp[^] Shows how to use the built-in compilers in the .NET framework to allow users of your product to write script to control and hook in to the application.
-
I think this is wht you need. http://www.divil.co.uk/net/articles/plugins/scripting.asp[^] Shows how to use the built-in compilers in the .NET framework to allow users of your product to write script to control and hook in to the application.
Hi Can you please answer my one more question? I am passing parameters through soap, but i am not getting the exact result back.
Dim env As SoapEnvelope Dim epr As EndpointReference Dim client As MyHttpClient Dim rs As SoapEnvelope Dim bodyResponse As String Dim web\_namespace As String Dim web\_uri As String Dim web\_method As String Dim action As String Dim inner\_xml As String web\_method = MethodTextBox.Text.Trim web\_uri = WebServiceURLTextBox.Text.Trim web\_namespace = NamespaceTextBox.Text.Trim If web\_namespace.EndsWith("/") = False Then web\_namespace += "/" End If action = web\_namespace & web\_method inner\_xml = "<" & web\_method & " xmlns=""" & web\_namespace & """" & " >TestUser" env = New SoapEnvelope env.Context.Addressing.Action = New Action(action) env.CreateBody() env.Body.InnerXml = String.Format(inner\_xml) epr = New EndpointReference(New Uri(web\_uri)) client = New MyHttpClient(epr) client.WebAction = action rs = client.TestWebRequest(env) bodyResponse = rs.Body.OuterXml TestReport.Text = bodyResponse End Sub
End Class
Option Explicit On
Option Strict OnImports System.Xml
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports System.WebPublic Class MyHttpClient
Inherits SoapClientFriend intWebAction As String WriteOnly Property WebAction() As String Set(ByVal Value As String) intWebAction = Value End Set End Property Public Sub New(ByVal dest As EndpointReference) MyBase.New(dest) End Sub '"http://tempuri.com/TestWebService/MyService/HelloWorld")> \_ \_ Public Function TestWebRequest(ByVal envelope As SoapEnvelope) As SoapEnvelope Dim response As SoapEnvelope Dim msg As String response = MyBase.SendRequestResponse("HelloWorld", envelope) msg = response.Body.OuterXml TestWebRequest = response End Function Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope) MyBase.FilterMessage(envelope)