Starting a Silverlight VS2010 Debugging Session with Custom URL Settings

When I debug a Silverlight application, Visual Studio simply opens the page without additional URL parameters.

So, the URL will look something like this: http: // localhost: 65351 / MyApp /

However, I want to add some specific features when someone navigates to pages with additional parameters in the URL. For example: http: // localhost: 65351 / MyApp / A2Sk9zu

This is a shortened link that my application will interpret.

I get that I can access the URL parameters through HtmlPage.Document.QueryString.Keys , but I cannot start a debugging session with any parameters to check if the stream was processed correctly.

+6
source share
1 answer

In your .web project, with your Silverlight application, right-click and select Properties.

In the section "Web" there is a section "Action". In the "Start Action" section, it will probably be set to "Specific Page" and display your initial hosting page. e.g. Default.aspx

Just change the url there to add options like Default.aspx? Test = 123

(Of course, an alternative is to simply change your browser URL manually as soon as the application starts).

+11
source

Source: https://habr.com/ru/post/890512/


All Articles