I'm interested in the "only start from a web page" option.
But, this is only useful if you can pass data to the smart client from the web page. Preferable thru the URL. And guess what -- You CAN! You just have to pile through a lot of help docs to find the documentation on it.
So here is what you do.
In you program, you will need some code that looks like this:
if (ApplicationDeployment.IsNetworkDeployed)
{
// retrieve the url. It will look something like this:
// http://localhost/myapp.Application?Param=Var
string url =
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0];
// do something with the url
}
Next step is to call your application through your url with a parameter attached. It will probably look like this:
http://localhost/MyApp/MyApp.Application?Param=Var
Everything after the ? is up to you. Also left up to you is parsing the url for the parameters and values.
No comments:
Post a Comment