The way to insert Chinese character into MySQL table. You need set the table structure charset to utf8.
CREATE TABLE IF NOT EXISTS `contents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
After that, add the following code as below:
mysql_connect(HOST, USER, PASSWORD);
mysql_select_db(DBNAME);
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");
MSSQL store DateTime format is standard. But sometimes we need change the format to display it to user, let them more easy read and understand which Datetime format was set in our Application.
If use ASP.net retrieve the MSSQL DateTime Data to you application, it will display like below format.
But, when validate the DateTime with ASP.net it will return an error.
Because the DateTime format set in ASP.net was “06-03-2014 12:00:00 AM”. But now we just need to display Date only not need time.
There are different type of results that are available in ASP.net MVC. When create new controller, they will come with actions by default. The Empty controller includes an Index action with a return value of type ActionResult. ActionResul class is the base class for all action results.
There are different ActionResult types explained below.