Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi everyone,

I am not sure if this is at all possible.

I would like to start a vb.net application (which contains several buttons- and trigger one of the buttons in that form) from a webform in my asp.net program.

 

Thanks

Farshad
Posted

Yo, Farshad! I really cant think of a reason for watever u hope to achieve (triggering of buttons' in other forms). Anyway, u can try to declare your button in code behind file as:

 

Public withevents buttonName as button

 

and in ur buttonName_Click(byval sender as object, ..)Handles...:

 

fireWhenClicked() 'write a method to handle stuff that

'u want to handle when button is clicked

 

Then ur method:

Sub fireWhenClicked()

... ....

End Sub

 

Lastly, in the code behind file of the form u wanna trigger the button:

 

Dim test As FormWhereButtonIsInInitially

'test.buttonName_Click(sender, e)

test.testing() ' else use the method declared

 

use "test.buttonName_Click(sender,e)" only when u are able to provide the parameters like sender object (sender)and system arguements (e)

 

HOPE IT WORKS FOR U! :)

P.S: FOR EASE OF READING, COPY AND PASTE MY CODES IN VISUALBASIC.NET.

Posted

Hi,

I have made the job a bit simpler now.

Do u know how to run an .exe from asp.net?

for example i have an .exe which is a win application in vb.net. I would like the asp.net program to run this .exe

 

Thanks

Farshad
  • Administrators
Posted

You can launch another program from .Net code - have a look at the Process class (Process.Start is the method itself)

However if an application is launched from ASP.Net it will run under the ASPNET user account and the UI will not be visible.

What are you trying to acheive? There may be an easier way round the problem.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...