Hi,
I need a help, actually i am a new learner of xamarin. from last 10 days i was searching for this issue but haven't find correct solution.
I want to open a newtab reportviewer in webview on click Navigating
private void webviewNavigating(object sender, WebNavigatingEventArgs e)
{
if (e.Url.Contains(".pdf"))
{
// Retrieving the URL
var pdfUrl = new Uri(e.Url);
// Open PDF URL with device browser to download
Device.OpenUri(new Uri(e.Url));
// Cancel the navigation on click actions
// (retains in the same page.)
e.Cancel = true;
}
}
}
}
it is not working kinldy help me.
Loading
Amit GuptaPosted Apr 17, 2020, 7:26 AM
manoj mishraPosted Apr 17, 2020, 6:57 AM
Amit GuptaPosted Apr 17, 2020, 6:13 AM
manoj mishraPosted Apr 17, 2020, 5:11 AM
as per another given solution
var Url = "http://XXXXXX/Student/StudentLogin.aspx";
{
if (e.Url.Contains("Report_ViewerStd"))
{
// Retrieving the URL
var pdfUrl = new Uri(e.Url);
// Open PDF URL with device browser to download
Device.OpenUri(new Uri(e.Url));
// Cancel the navigation on click actions
// (retains in the same page.)
e.Cancel = True;
}
}
}
}
kindly help me so solve this problem thanks in advance.
Amit GuptaPosted Apr 17, 2020, 2:58 AM