Hello,
I am trying to open below URL with query string from silverlight XAML page
Silverlight Project :
I have used telerik RadhtmlPlaceHolder as below :
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
>
<UI:GroupBox>
<Grid>
<telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" Grid.Row="0" x:FieldModifier="public" />
</Grid>
</UI:GroupBox>
And load URL from code behind we screen is opened as below :
private void OpenNSScreens()
{
try
{
this.Dispatcher.BeginInvoke(delegate
{
this.RadHtmlPlaceholder1.SourceUrl = new Uri("https://10.100.112.23:8074/login?oIFt7TZ0aPMkx589qvLVo7BnXsvYkHxwbJHYIP/1GJeSvTDwSOVPl4EWKG1frk7f");
});
}
catch
{
throw;
}
}
ASPX project : (Angular JS)
I have added one controller and in controller i have method named "" from where above encrypted string is decrypted :
public class LoginUserController : ApiController
{
public static string Decrypt(string input, string password)
{
// Logic
}
}
What actually happened is some sometimes my Decrypt method is not posted from .js file at that time my functionality is not working
Js is as below :
app.controller("LoginUserController",
function LoginUserControllerFunc($scope, $http, ngEncryption, $cookies, $location, $rootScope) {
var querystring = window.location.search.substring(1);
if (querystring != null && querystring != undefined && querystring.length > 0) {
var request = $http({
method: "POST",
url: "/api/LoginUser/DecryptString",
params: { encryptionText: querystring }
}).then((function myfunction(successdata) {
if (successdata.status == "202") {
$scope.LoginUser.ErrorMsg = successdata.data;
}
else {
querystring = successdata.data;
}
$scope.IsFromSilverlight = true;
var obj = JSON.parse(successdata.data);
$scope.UserList = obj;
if (obj != null) {
window.location.href = "/WelcomeScreen";
}
}));
}
});
Please let me know what can I do to resolve this issue.
I am trying to open below URL with query string from silverlight XAML page
Silverlight Project :
I have used telerik RadhtmlPlaceHolder as below :
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
>
<UI:GroupBox>
<Grid>
<telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" Grid.Row="0" x:FieldModifier="public" />
</Grid>
</UI:GroupBox>
And load URL from code behind we screen is opened as below :
private void OpenNSScreens()
{
try
{
this.Dispatcher.BeginInvoke(delegate
{
this.RadHtmlPlaceholder1.SourceUrl = new Uri("https://10.100.112.23:8074/login?oIFt7TZ0aPMkx589qvLVo7BnXsvYkHxwbJHYIP/1GJeSvTDwSOVPl4EWKG1frk7f");
});
}
catch
{
throw;
}
}
ASPX project : (Angular JS)
I have added one controller and in controller i have method named "" from where above encrypted string is decrypted :
public class LoginUserController : ApiController
{
public static string Decrypt(string input, string password)
{
// Logic
}
}
What actually happened is some sometimes my Decrypt method is not posted from .js file at that time my functionality is not working
Js is as below :
app.controller("LoginUserController",
function LoginUserControllerFunc($scope, $http, ngEncryption, $cookies, $location, $rootScope) {
var querystring = window.location.search.substring(1);
if (querystring != null && querystring != undefined && querystring.length > 0) {
var request = $http({
method: "POST",
url: "/api/LoginUser/DecryptString",
params: { encryptionText: querystring }
}).then((function myfunction(successdata) {
if (successdata.status == "202") {
$scope.LoginUser.ErrorMsg = successdata.data;
}
else {
querystring = successdata.data;
}
$scope.IsFromSilverlight = true;
var obj = JSON.parse(successdata.data);
$scope.UserList = obj;
if (obj != null) {
window.location.href = "/WelcomeScreen";
}
}));
}
});
Please let me know what can I do to resolve this issue.