CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    180

    submit to the server

    OK, this must be a very very simple question for ASP programmers to answer.
    After I have gathered all the information I want from the user and after
    the user has clicked on a submit button, how do I make an operating system
    style call on the server.

    Now, I have already figured out how to create a function call in the ASP
    development environment that is called when the user clicks on the submit
    button.

    So my qesttion is to how to create a system level command through ASP.

    Specifically, I am using ASP.NET. Let me explain further. I have just completed
    a program that is very simular to the #3 AJAX demo that Joe Strgner has made on
    http://asp.net/learn/ajax-videos/ where he gets users to select from a group
    of "CascadingDropDown" control extender classes. When the user has selected
    from the third drop down control, a label is custom formatted and displays the
    group of selected options.

    What I want to do is this. After this is done, I want to have a "submit" button
    on this page which, when the user presses it, a call is made on the server side
    that will include the users selections as parameters.

    Something like this, for example:

    "CALL SOMEPROGRAM.EXE " selection_1, selection_2

    I think I will ask this question in a simpler way.
    Notepad is a program that can be launched from the command line.
    I can open a CMD window (dos window) and on the command line,
    I can type "notepad" and the notepad execuatble will launch and I will
    see that program. So, how would I do that inside asp.net and
    specifically inside the Default.aspx.cs file which will get called
    when the user clicks on the send button in the function

    protected void Button1_Click(object sender, EventArgs e)
    {
    }

    Is there some sort of "run" command in asp.net like "run notepad"?


    I also need to have some information specific to the user included in the submit.
    We are on an intranet and each user has an alias. How do I snag this information?

  2. #2
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: submit to the server

    Well, in a 'normal' .NET application you can use the System.Diagnostics.Process.Start method to launch an external application.
    In ASP.NET (you can also use that method) however you'll probably run into two problems.
    1. Access rights. It's not given that the account running the IIS (or the .NET working process) has access to launch external applications. This you can solve using impersonation.
    2. Where should the application launch? In a normal situation the IIS service hasn't any desktop (screen to place a window) associated with it.

    Maybe this can help you out.

    - petter

  3. #3
    Join Date
    May 2008
    Posts
    4

    Re: submit to the server


  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: submit to the server

    You can deploy an app using Click Once Technology. You publish it to the web, and say when it will be available. It can be available online online.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured