Monthly Archives: January 2014

Unable to cast object of type ‘System.Data.Entity.Infrastructure.DbQuery`1[ConsoleApplication1.Product]’ to type ‘System.Data.Objects.ObjectQuery’.

Let me post problem this time instead of solution. Look at the code I have and examples in the Internet. This code should not get an error:       static void Main(string[] args)     {       //northwindEntities context = new … Continue reading

Posted in .Net | Tagged | 1 Comment

Automating Migration from Windows XP to Windows 8.1

After watching the video Automating Migration from Windows XP to Windows 8.1 (http://channel9.msdn.com/Series/Windows-XP-to-Windows-8-1-Migration/Mod1) then I think there is a big gap in it. The hardware did not mention throughout the whole video. Should we ask ourselves how many computer hardware … Continue reading

Posted in Community, Computers and Internet, Operating System | Tagged , | Leave a comment

How to set the IE8 mode in IE11

We use to F12 in IE9 or IE10 to set the IE to IE8 mode. Unfortunately IE11 F12 is totally an “alien” interface.   You need to enable the Compatibility View. For example, I have a troux application hitting the … Continue reading

Posted in .Net, Community, Computers and Internet | Tagged , | Leave a comment

The required anti-forgery form field "__RequestVerificationToken" is not present. Ensure that cookies are enabled in your browser.

This is the third post regarding this issue. There is another possibility to cause this problem. This is fatal and this is the root cause of my problem too. It is glad that I found another post here http://xavierdilipkumar.com/post/2013/12/04/The-required-anti-forgery-form-field-__RequestVerificationToken-is-not-present-Ensure-that-cookies-are-enabled-in-your-browser.aspx. The … Continue reading

Posted in .Net | Tagged | Leave a comment

How to save the database table under different Schema in Microsoft SQL Server

It is not easy to find it because the Properties window is normally Auto Hide.   You need to expand the Properties then select the Schema.   Reference: http://technet.microsoft.com/en-us/library/ms188264.aspx

Posted in .Net | Tagged | Leave a comment

Set row data from WinForm DataGridView

After I wrote Get row data from WinForm DataGridView (https://chanmingman.wordpress.com/2014/01/01/get-row-data-from-winform-datagridview/) I encountered this question in Visual C# forum “c#.net to assign a value to the cell in datagrid pro grammatically when clicking radio button” (http://social.msdn.microsoft.com/Forums/en-US/447264b9-920c-4dd5-875e-2ff9e4c1117d/cnet-to-assign-a-value-to-the-cell-in-datagrid-pro-grammatically-when-clicking-radio-button?forum=csharpgeneral) So I added the Button … Continue reading

Posted in .Net | Tagged , | Leave a comment

Get row data from WinForm DataGridView

Despite with WPF many developer still go for WinForm client because they do not need the rich interface. There is still a common problem out there. One of them is how to get the row data from DataGridView. Let try … Continue reading

Posted in .Net | Tagged , | 1 Comment