Some time this error occur after upgrading old Visual Studio project to new. Here is the quick fix.
Author Archives: atif
Theme ‘Standard’ cannot be found in the application or global theme directories
Check necessary files in the App_Themes directory. When we publish our project then some files could be missed. Right click on that file (that are missed) click on property and choose “Copy to Output Directory” set as “Copy always“.
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
This exception occur when we try to redirect a page. Solution: To solve this problem we should use second argument of Response.Redirect that will stop current page’s execution and move to next page. Sencond argument should be false. Full solution is below [sociallocker] Response.Redirect(“http://www.wisdomitsol.com”,false); [/sociallocker]
Get data from database compare by datetime or by only date using linq
1. Compare by datetime public List<tblName> getByDateTime(DateTime dateTime) { return objEntity.tblName.Where(p => p.publish_time <= dateTime).ToList(); } Call above function
Include external jar files in android project, eclipse
How to include external jar file in eclipse for Android: Create libs folder in project’s root directory, if libs folder is not exist. Right click on your project click on New and Folder
Apply gradient to Android View
Images have loat of memory than using colur. We also need different size images for different resolutions, so in Android we can use gradient that shade the color. We can apply gradient to different Views in Android like EditText, TextView or Button etc. It will be take less memory.
Android SharedPreferences
Introduction Preferences are generly a little storage and typically name value pairs. They can be stored as “Shared Preferences” across various activities in an application. Or it can be something that needs to be stored specific to an activity.Here you will see the useage of SharedPreferences.
Convert any file into byte array or byte array into string in Android
How to convert image or video file into byte[] or byte[] into String in Android: TO upload image, video or any other file on server fro Android app we need to convert that image / video file to string or upload byte by byte. Note: this method is suite able for small files (image, video, …
Continue reading “Convert any file into byte array or byte array into string in Android”
Converting integer to string Android / Java
How to convert Integer into String in Android or Java: int id=29; String strId=Integer.toString(id); How to convert string into integer in Android / Java
Converting a string to an integer on Java / Android
How to convert String into Integer in Android or Java: String strId=”29″; int id = Integer.parseInt(strId); Note: