Thursday, 19 April 2018
Wednesday, 14 February 2018
Saturday, 20 January 2018
cordova "no java files found that extend cordovaactivity"
Getting Error as:
Severity Code Description Project File Line Suppression State Error No Java files found which extend CordovaActivity. OilFreeRecipes 1
Severity Code Description Project File Line Suppression State Error No Java files found which extend CordovaActivity. OilFreeRecipes 1
This issue is causing due to missing of MainActivity.Java File Generally it is residing on the below path.
[Application Name]\platforms\android\src\com
Here it should have the folder name based on the namespace you have given. Suppose I have given namespace as com.passion.oilfreerecipes So there should have folder passion --> OilfreeRecipes
Read Array object in Javascript Based on Query String
Please check the previous article Click here to see how we can read the
value which we pass in query string
Now Framing the javascript array Object,
var val = [
{ Id: 1, Image: 'Content/Images/2.jpg', Value:'This is 1 content' },
{ Id: 2, Image: 'Content/Images/2.jpg', Value:'This is 2 content' }
];
Code to read array of object is javascript
Saturday, 23 December 2017
Reading Query string Values in Javascript
Using simple javascript to get the query string value of URL.
We have URL as
<a href="DisplayContent.html?id=0">
0</a>
<a href="DisplayContent.html?id=1">1</a>
To Read the content of URL you can use below method as;
function getParameterValueByName(name, url) {
if (!url) url =
window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return
decodeURIComponent(results[2].replace(/\+/g, " "));
}
Friday, 8 December 2017
Tuesday, 14 November 2017
Convert Object to DataTable in C#
Converting object to datatable using the C# code, it help in
many places like doing the bulk insertion of data to database. There we need to
send data in the form of table.
Suppose we have an Employee Class.
public class Employee
{
public int EmployeeId { get; set; }
public string EName { get; set; }
public int Age { get; set; }
public decimal Salary { get; set; }
}
Now instead of creating method for converting the object to
datable, we will create a generic extension method which will convert any type
of object into datatable.
public static class Utility
Thursday, 2 November 2017
MVC 5 Not working in IIS 7
It’s a common problem when MVC application is not working in
IIS but working good with IIS Express.
This is happening as you have installed IIS after Visual
studio and due to this reason ASP.net is not registered with IIS.
You just need to register your ASP.net like below.
Register
ASP.NET
64 bit system
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis
–i
32 bit system
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis
–i
Friday, 27 October 2017
Changing icon on Collapse and Expand Panel
Collapsing and Expanding
for Panel is make very easy by Bootstrap that you can directly achieve
using bootstrap.js and Bootstap.css [You can download it from getbootstrap.com]. Than need to write a simple code to change the icon using jQuery.
Please see below that how to demostrate Changing icon on Collapse and Expand Panel.
It will be look alike below.
Friday, 6 October 2017
Cordova Exit from App
Code to exit from mobile app using the JQuery Code (Cordova exit app event).
Code for exit from app
Code for exit from app
exitFromApp: function () {
if (navigator.app) {
navigator.app.exitApp();
}
else if (navigator.device) {
navigator.device.exitApp();
}
return false;
},
Exit from app when
click button in android phonegap?
Calling Method
<button name="btnExit" style="background-color:transparent;color: #f82284 !important;font-size:18px;border:0" onclick="app.exitFromApp()" id="btnExit">Exit</button>
Subscribe to:
Posts (Atom)



