trying to install a prebuilt full application into a web part for sharepoint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcnunez
    New Member
    • Jan 2010
    • 1

    trying to install a prebuilt full application into a web part for sharepoint

    I am trying to add a c# calculator program into a web part that is being added as a feature in sharepoint 2007. I can not seem to get the site to load the calc.exe program. I am using this below.


    Code:
    protected override void OnLoad(EventArgs e)
            {
                if (!_error)
                {
                    try
                    {
                        base.OnLoad(e);
                        this.EnsureChildControls();
                        System.Diagnostics.Process.Start("c:\\WinFormCalculator.exe");
    
    
                        // Your code here...
                    }
                    catch (Exception ex)
                    {
                        HandleException(ex);
                    }
                }
            }
    Last edited by tlhintoq; Jan 31 '10, 11:32 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      I know nothing of sharepoints or even running applications from within web sites.

      But... From the perspective of the client computer opening the web page... Doesn't this
      Code:
      System.Diagnostics.Process.Start("c:\\WinFormCalculator.exe");
      look at the client's local C: for the executable? So unless everyone running the webpage also has your calculator installed at this location, there is nothing to start.

      Or do I missunderstand the process and this is trying to run from the server's C: drive?

      Comment

      • dranck
        New Member
        • Feb 2010
        • 1

        #4
        marcnunez -

        You cannot load an exe into a web page. Calc is a desktop app and runs locally on the user's PC. You must create or use a web-based calculator program design as a web part or web control. you can then load the control in Sharepoint as you would any other control.

        Hope that helps.

        Comment

        Working...