ASP.NET(vb.net) Server.Execute() - Server Object - Server.Execute() : The Execute method calls an .asp file, and processes it as if it were part of the calling ASP script. The Execute method is similar to a procedure call in many programming languages.
ShotDev Focus:
- ASP.NET(vb.net) Server.Execute() - Server Object
Example
AspNetServerFiles.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim i As Integer For i = 0 To 10 Me.lblText.Text = Me.lblText.Text & i & "<br>" Next End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText" runat="server"></asp:Label><br /> </form> </body> </html>
AspNetServerExecute.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Me.lblText.Text = "www.ShotDev.Com" Server.Execute("AspNetServerFiles.aspx") End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText" runat="server"></asp:Label><br /> </form> </body> </html>
Screenshot