Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Calling VBS

 
Logged in as: Guest
arrSession:exec spGetSession 2,4,63977
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP.NET >> Calling VBS
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Calling VBS - 9/2/2008 2:48:48 AM   
  spiritnblk

 

Posts: 2
Score: 0
Joined: 9/2/2008
Status: offline
 
If I have this in the wrong forum, please feel to move it.


For whatever reason I can't get the Sub to run. Everything looks right (to me), but when I click on the image button, nothing happens. I'm basiclly learning as I go, so be gentle. :o)


<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >



<
head id="Head1" runat="server">

<
script language="vb" type="text/vb">
Sub
Public Copier3()

Dim
objShell

Dim
vbsFile
vbsFile = Server.MapPath(
"c:\PMP\copier3.vbs")

Set
objShell = Server.CreateObject("Wscript.Shell")
objShell.Run vbsFile



</
script>

<title>Untitled Page</title>




</
head>

<
body>



<form id="form1" runat="server">


<div style="position:absolute;top:325px;left:104px;width:300px;"><asp:ImageButton ID="Copier31" runat="server" ImageUrl="~/Images/1Copier3.gif" OnClientClick="Copier3" /></div>



&nbsp;

<div style="position:absolute;top:681px;left:194px;width:300px;"><asp:ImageButton ID="Copier32" runat="server" ImageUrl="~/Images/2Copier3.gif" OnClientClick="Copier3" /></div>

&nbsp;

<div style="position:absolute;top:786px;left:285px;width:300px;"><asp:ImageButton ID="Copier33" runat="server" ImageUrl="~/Images/3Copier3.gif" OnClientClick="Copier3" /></div>

<div style="position:absolute;top:777px;left:194px;width:300px;"><asp:ImageButton ID="Copier21" runat="server" ImageUrl="~/Images/1Copier2.gif" /></div>



<div style="position:absolute;top:876px;left:104px;width:300px;"><asp:ImageButton ID="Copier22" runat="server" ImageUrl="~/Images/2Copier2.gif" /></div>

<div style="position:absolute;top:892px;left:284px;width:300px;"><asp:ImageButton ID="NOC" runat="server" ImageUrl="~/Images/NOC.gif" /></div>


<div style="position:static;bottom:0px;left:7px;width:400px;"><asp:Image ID="FloorPlan" runat="server" ImageUrl="~/Images/Call Center Ports Plan_Model.gif" /></div>

</form>
</
body>
</
html>
 

 
 
VBS
 

      

 
 
 
Post #: 1
 
 RE: Calling VBS - 9/25/2008 3:06:05 PM   
  TNO


Posts: 1285
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
In this situation I'm curious to why you don't just do it all in .NET?

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to spiritnblk)
 
 
Post #: 2
 
 RE: Calling VBS - 11/6/2008 6:03:03 AM   
  spiritnblk

 

Posts: 2
Score: 0
Joined: 9/2/2008
Status: offline
I tried that, as well.

(in reply to TNO)
 
 
Post #: 3
 
 RE: Calling VBS - 11/6/2008 11:28:52 AM   
  TNO


Posts: 1285
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
your page language is set to C#

try doing it in C# inside your code behind instead

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to spiritnblk)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP.NET >> Calling VBS Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts