Open new form and pass variables with button click

Discussion in 'ASP .Net' started by Microsoft, Apr 28, 2005.

  1. Microsoft

    Microsoft Guest

    I have a page where the user fills in textbox and pushes a button. I would
    like to then execute some vbscript at that point, but the page is written in
    asp.net using VB so I assume I have to open a new form to execute the
    vbscript. I can't figure out how to get the script to execute since the new
    aspx page I am opening will not have any buttons and I can't find the
    equivilant of an on load.


    here is the script

    I need get the value of SERVERPAGE from the first page.

    dim CompName,oWshShell
    set oWshShell = CreateObject("WScript.Shell")
    oWshShell.run path & " 2 " & addresses(ubound(addresses)) & " \\" &
    ServerName & "\",0,false


    Obviously a lot easier if I could just run VBscript from a page that has
    language set to VB
     
    Microsoft, Apr 28, 2005
    #1
    1. Advertising

  2. Well you're rather vague about what you're trying to accomplish, but maybe
    something like this could help?

    MyButton.Attributes.Add("onclick", "MyVBScriptFunction()")

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Microsoft" <> wrote in message
    news:...
    >I have a page where the user fills in textbox and pushes a button. I
    >would
    > like to then execute some vbscript at that point, but the page is written
    > in
    > asp.net using VB so I assume I have to open a new form to execute the
    > vbscript. I can't figure out how to get the script to execute since the
    > new
    > aspx page I am opening will not have any buttons and I can't find the
    > equivilant of an on load.
    >
    >
    > here is the script
    >
    > I need get the value of SERVERPAGE from the first page.
    >
    > dim CompName,oWshShell
    > set oWshShell = CreateObject("WScript.Shell")
    > oWshShell.run path & " 2 " & addresses(ubound(addresses)) & " \\" &
    > ServerName & "\",0,false
    >
    >
    > Obviously a lot easier if I could just run VBscript from a page that has
    > language set to VB
    >
    >
     
    Steve C. Orr [MVP, MCSD], Apr 29, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathew George
    Replies:
    1
    Views:
    2,374
  2. Purvi T
    Replies:
    0
    Views:
    864
    Purvi T
    Oct 19, 2004
  3. Amy
    Replies:
    0
    Views:
    998
  4. Mathew George
    Replies:
    0
    Views:
    163
    Mathew George
    Jul 1, 2003
  5. Mathew George
    Replies:
    0
    Views:
    176
    Mathew George
    Jul 1, 2003
Loading...

Share This Page