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]
Author Archives: atif
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:
Java / Android Sort ArrayList
How to sort an ArrayList in Android: Following code is describing, how to sort an Android / Java array list of user defined class. Collections.sort(empList, new Comparator<Employee>(){ public int compare(Employee emp1, Employee emp2) { return emp1.getFirstName().compareToIgnoreCase(emp2.getFirstName()); } });
Programmatically delete all messages in android, without loop
Delete messages by message id We can delete all sms (messages) from default android application / database without loop.