locked
Supplying parameters RRS feed

  • Question

  • User-228551200 posted

    Is there any way to run an ASPX page in debug mode and supply parameters?  (I mean, a valid way supported by the program, not a hack.)

    Monday, February 18, 2013 1:59 PM

Answers

  • User-228551200 posted

    Thanks for the suggestions.  There are a million ways I can think of doing this 'manually' - it's a real PITA to paste those in every time I want to test a program.  For this, I'll just make a dummy aspx file that uses a client javascript to launch the program I want to debug (with the right parameters) in another window.  I thought it might be supported directly by the IDE - seems a very basic feature to leave out.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 18, 2013 2:34 PM

All replies

  • User-1360095595 posted

    What parameters are you talking about? 

    Monday, February 18, 2013 2:02 PM
  • User-228551200 posted

    URL parameters

    Monday, February 18, 2013 2:08 PM
  • User-1360095595 posted

    Run the page then add the querystring parameters in the url bar of the browser and go. 

    Monday, February 18, 2013 2:11 PM
  • User281315223 posted

    For URL parameters, all you would need to do would be to manually pass in values as QueryString parameters through the Navigation bar :

    YourPage.aspx?ParameterName=ParameterValue&ParameterTwoName=ParameterTwoValue
    

    which you could access within your page from the QueryString. 

    //YourPage.aspx Page Load Event
    protected void Page_Load(object sender, EventArgs e)
    {
            //Grabs the values from the QueryString
            string parameterOne = Request.QueryString["ParameterName"]; //"ParameterValue"
            string parameterTwo = Request.QueryString["ParameterTwoName"]; //"ParameterTwoValue"
    }
    Monday, February 18, 2013 2:13 PM
  • User-228551200 posted

    Thanks for the suggestions.  There are a million ways I can think of doing this 'manually' - it's a real PITA to paste those in every time I want to test a program.  For this, I'll just make a dummy aspx file that uses a client javascript to launch the program I want to debug (with the right parameters) in another window.  I thought it might be supported directly by the IDE - seems a very basic feature to leave out.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 18, 2013 2:34 PM