A
Atul Rane
I am using ClickOnce. I want to retrive the url sended to windows Application
i am using the code for getting the querystring information:
public NameValueCollection GetQueryStringParameters()
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.ToString())
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ToString())
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.Query.ToString());
NameValueCollection nameValueTable = new NameValueCollection();
string queryString =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.Query.ToString();
MessageBox.Show(queryString.ToString() );
nameValueTable = HttpUtility.ParseQueryString(queryString);
return (nameValueTable);
}
But i am not able to get the querystring.
My windows applications Main function is like that :
static void Main()
{
try
{
Application.Run(new DigiScope());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "DigiScope");
}
}
Page Load event of windows aaplication is like that :
private void DigiScope_Load(object sender, EventArgs e)
{
RotationDirection.SelectedIndex = 0;
zoomLeft = AlgorithmInputs.Width;
AlgorithmInputs.Visible = false;
SetZoom.Left = 5;
try
{
NameValueCollection nameValueTable = new NameValueCollection();
/* Here i am calling the
GetQueryStringParameters(); method which should give me the query string
information */
nameValueTable = GetQueryStringParameters();
OpenImageOnViewport();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "DigiScope");
}
}
i am using the code for getting the querystring information:
public NameValueCollection GetQueryStringParameters()
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.ToString())
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ToString())
MessageBox.Show(System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.Query.ToString());
NameValueCollection nameValueTable = new NameValueCollection();
string queryString =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.Query.ToString();
MessageBox.Show(queryString.ToString() );
nameValueTable = HttpUtility.ParseQueryString(queryString);
return (nameValueTable);
}
But i am not able to get the querystring.
My windows applications Main function is like that :
static void Main()
{
try
{
Application.Run(new DigiScope());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "DigiScope");
}
}
Page Load event of windows aaplication is like that :
private void DigiScope_Load(object sender, EventArgs e)
{
RotationDirection.SelectedIndex = 0;
zoomLeft = AlgorithmInputs.Width;
AlgorithmInputs.Visible = false;
SetZoom.Left = 5;
try
{
NameValueCollection nameValueTable = new NameValueCollection();
/* Here i am calling the
GetQueryStringParameters(); method which should give me the query string
information */
nameValueTable = GetQueryStringParameters();
OpenImageOnViewport();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "DigiScope");
}
}