.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

Help with running external Process from button click

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
 
We need assistance with a portion of a major web application project scheduled to begin user testing within 10 days.  The troublesome part of the code calls an external application when a button is clicked in Web page.  When run from a command prompt or bat file, the external application, App.exe, runs perfectly producing the desired result.  We created a test page and a small console application, Con.exe, to test the button code with a known quantity.  The test application runs perfectly when the button in the Web page is clicked.  However when we change the code to run App.exe instead of Con.exe, the App.exe code will not execute.  We even tried creating a bat file to execute App.exe.  Like the exe, the bat file executes from the command prompt or when double-clicked, but fails to run when called as a process from the button click event.  Can anyone assist us?  Here is the C# code: (.Net 3.5 sp1) using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Diagnostics;   namespace WebButtonTest {     public partial class _Default : System.Web.UI.Page  &nbs


View Complete Post


More Related Resource Links

When i start a process and running an external program is there any way to set the program window po

  

  private void View_Log_File_Click(object sender, EventArgs e)
        {

            if (processNotePad == null || processNotePad.HasExited)
            {
                processNotePad = System.Diagnostics.Process.Start("notepad.exe", "\"" + path_exe + "\\log\\logger.txt\"");
            }
            else
            {
               
            }

           
           
        }

The problem is after the program the process started and i see the program when i click somewhere on the form1 the main application window the window of the process program is moving

Running external 32 process from 64 bit OS

  

I am using System.Diagnostics.Process.Start() to run an external program.

I am seeking to find the best method to handle running an extrnal 32 bit application from my C# project whether it is being used on a 32 or 64 bit platform.

The path to the the external program is configured centrally for all workstations. So at the moment when I invoke the Process.Start("C:\Program Files\MyProgram\MyProgram.exe"), it works when invoked from a 32 bit OS, but not on a 64 bit.

I know I could programatically detect the OS type and alter the file path accordingly, however I thought that there was a method where this was handle automatically.

i.e. When "C:\Program Files\MyProgram\MyProgram.exe" is invoked on 64 bit OS, the system will know to execute it from "C:\Program Files\MyProgram (x86)" instead.

 


Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page

  

how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services

 

Thanks in advance


Button click in master page use in other pages I have to click twice. Why?

  

In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?



Infopath button click event in custom workflow code.

  

Hi All,

I have designed the infopath form(Init) and integrated with my state machine workflow. i want to access button click event (designed in Infopath form) in my workflow code.

Can you help me.

Thanks,

Chandresh 

 


Object expected error

  

<input type="button' onclick="timeoutCheck()" value="Click Me!" />

it tells me Microsoft JScript runtime error: Object expected

 

timeoutCheck() is my script function that i declared above the input tag

can anyone tell me why i am getting this error

hello i need help , any ideas are welcome i have been working on this for two weeks now and cannot seem to be able to advance


Catch button click event in different .aspx page.

  

I have a button which starts processing.
I want that when ever a button is click from page1.aspx .. a count down timer should start and displayed on page2.aspx.
I am thinking of using iframe to join 2 pages.

Please let me know your suggestions.

Thanks


Infopath form using Visual Studio - How to bind repeating table on submit button click ?

  

Hello friends,

   I have created infopath form using Visual Studio 2008

Form have 3 dropdowns and one repeating table which is bound by Datasource ( List from sharepoint ).

whenever i select appropritae values from drop down, Repeating table gets bound as datasource for dropdown and repeating table are same.

I have done conditional formating for repeating table using repeating table properties.

 

My Question:

 

Now i included one submit button and i want when i click submit button it will check DropDown Values and if appropriate record matching these values found it will fill repeating table

How i achive this ? as i dont find how to bind repeating table on submit button.

Please help if anyone have answer.

 

Thanks and Regards,

 

Kapil Bhosale.

 

 

 


ReportViewer Calendar button Click does not show calendar

  

I have a reportviewer on a page which is grabbing a report from a report server. the page is basically just a dropdownlist and a reportviewer control. The problem I have is that in the report the user have to provide the dates for teh report. The reportviewer automatically adds the textbox for the date entry and a calendar icon in front of it so the user can select the date. if I look at this page  in FireFox, when you click on the calendar button created by the reportviewer, the calendar control show up momentrily and dispappears. If you look at the same page in IE 7.0 nothing happens other than the page appears to be submitted. Does any body have any ideas on how to go about troubleshooting this bug?

 

Thanks


click a button to print current window form

  
how can i click a button to print current window form? i don't know how to set and define something? anyone give me example for my reference   thanks.

OK button click on Windows dialogue form not triggering click event

  
I have created an Add-In for Outlook 2003 in Visual Studio 2005. When a new message is sent and a toggle button is selected, a form that I have created will be displayed as a dialogue box, where further information can be entered. Once this information has been entered you can click the OK button and the message is sent. If you were to click the OK button with invalid data in the form, there would be a message box with an error message. This all works perfectly on my development machine but when I have packaged the Add-In and installed it on other machines it does not work. Clicking on the OK button does nothing, there is not even an error message. All the prerequsits are successfully installed and this is the only part of the Add-In that does not work. All help greatly appreciated. Thanks Nick

listview with button in item template - how do I handle the click event?

  
Hello,Using a listview control for the first time... I need a button for each item, and of course I need to handle the click event for the buttons... upon clicking a particular button I of course need to know which item the button is associated with so the appropriate action can be taken...In VS, I can't select the button and see my list of available events in the properties window like is normally done for controls outside of templates like this... what do I need to do?

How to get the combobox value inside Datagrid on Edit button click event

  
Hi     I have Datagrid template column like<DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>DataGridTemplateColumn Header="Edit" x:Name="Edit" ><DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn.CellEditingTemplate></DataGridTemplateColumn>SelectionChanged="cmbDGTeam_SelectionChanged" IsTabStop="True" /></DataTemplate><ComboBox Height="22" IsEditable="True" IsReadOnly="True" ItemsSource="{Binding}" DisplayMemberPath="Title" SelectedValuePath="TeamID" x:Name="cmbDGTeam"  SelectedValue="{Binding Path=TeamID,Mode=TwoWay}"<DataGridTemplateColumn.CellEditingTemplate><DataTemplate><DataTemplate><TextBlock Text="{Binding Title}"/></DataTemplate></DataGridTemplateColumn.CellTemplate><DataGridTemplateColumn Header="Team" Width="75"><DataGridTemplateColumn.CellTemplate> and Edit button Template column <DataGridTemplateColumn Header="Edit" x:Name="Edit" > </DataGridTemplateColumn.CellTemplate></DataTemplate><Button Content="Edit" IsEnabled="False" x:Name="btnEdit" Click="btnEdit_Click" ></Button>&l

Button Click in a Floating Div

  
I am having an unusual problem with asp.net 3.5 sp1. When I put any command control (html or asp.net) inside a div and set the css of the div to float:right or float:left. The command doesnt postback. As soon as I remove the css float condition the control works fine. Is anyone else having similar problems?

Button click event is not fired on button click

  
 Hi am using jquery flexi gride in web page and it is working fine .But now the problem is ocured when i click button to call server side event.I am not able to find out .Please guide me for this My button is as fallows and i am<asp:Button ID="btnExport" runat="server" Text="Export" Style="font-family: 'Times New Roman', Times, serif" OnClick="btnExport_Click" />  

Open PDF file on button click or hyperlink from asp.net

  
I want to open a .PDF file on button click or hyperlink. please help me.

Gridview and delete option - Button click displays message

  
Hi, I have a gridview connected to a sql database that allows the user to delete the record. I used the ASP.net automatic "options" for this. However, I would like when the user deletes a record, a message (textbox) appears in the form to say the record has been deleted. Please can anyone provide some sample codes?   Thanks in advance. Nijojo.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend