" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Solution for “Bad token” exception in while using custom Dialog.

Posted on November 23rd, 2015 by Arti Gupta

If you are creating a custom Dialog for Android, and using “getApplicationContext()” to pass the application context in the dialog, then most likely you would have faced a Force Close with this exception showing up in logcat. Uncaught handler: thread main exiting due to uncaught exception android.view.WindowManager$BadTokenException: Unable to add window — token null is […]

A Simple Time Saving Tip on ASP.NET DropDownList

Posted on November 23rd, 2015 by Palash Mondal

Problem For past few days I have been facing a problem while dynamically making a list item selected. Here is the code that I have used. Code ASPX <asp:DropDownList ID=”DropDownList1″ runat=”server” Width=”150px”> <asp:ListItem Value=”0″ Text=”– Select –” Selected=”True”/> <asp:ListItem Value=”1″ Text=”Red” /> <asp:ListItem Value=”2″ Text=”Greeen” /> <asp:ListItem Value=”3″ Text=”Yellow” /> <asp:ListItem Value=”4″ Text=”Pink” /> <asp:ListItem […]