Start VS2010 silverlight debugging session with custom URL parameters

半腔热情 提交于 2019-12-01 16:41:53

问题


When I debug a Silverlight app, Visual Studio will just open the page with no extra URL parameters.

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

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

That being a shortened link, which my app will interpret.

I get that I can access the URL paremeters via HtmlPage.Document.QueryString.Keys but I can't seem to start a debugging session with any parameters to actually check if the flow is handled correctly.


回答1:


On your .web project, hosting the Silverlight app, right click and select "Properties".

Under "Web" there is a "Start action" section. Under "Start action" it will probably be set to "Specific page" and shows your start hosting page. e.g. Default.aspx

Just change the URL there to add your parameters e.g. Default.aspx?test=123

(Of course the alternative is to just change the URL of your browser by hand, once the app has started).



来源:https://stackoverflow.com/questions/6345382/start-vs2010-silverlight-debugging-session-with-custom-url-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!