Responsive display: Inline-block

How to develop a responsive site which size can be adjusted while the display is still able to maintain its sequence and order, displaying a meaning page without running out of order?

Basically just have to add an attribute in the style of the div tag will do. For the main div, add display:inline-block in style, while the div’s in the main div will have to add float:left in style. While all the UI controls, images, words are in div tag.



An example from below which I have tried:

Normal web page view


Smaller size web page view (mobile)


 The code for above UI: Responsive display Inline-block

Web site for own testing:jsfiddle




A help in sharing how you feel after coming to my blog

Hi All,

I’m just trying to do a simple survey to see where I can improve to make my blog a better one. I do welcome if you have any comment whether good or bad or constructive criticism, please post below in the reply section. It would be better to specify which area can be improve. Thanks. 🙂

Last day of the holiday


As I’m musing what is my new job going to be like, how would the job be? how is the working environment? Are the people over there helpful? can I survive? What is my strategy? the journey to workplace is quite far too and will this job affect my study? Is this the right time to move to a new company?  Seem like more and more things were added into my thought. I’m not sure what my future is. How to proceed with my life as I’m already nearly half way through and things are getting tougher.

Continue reading

Sending email through store procedure

Database email setup

  • Double click ‘Databse Mail’ to start setup


Create mail configuration

  • select as below


  • key in the profile name and click ‘Add’


  • key in email address and the server ip address


  • add the SMTP email address and server ip address


  • click ‘Next’


  • click ‘Finish’



Store Procedure

Parse in the profile to be use to send email, recipient email, email body message and email subject.



Selecting data from MySql in MSSQL

Setup Link Server

  • right click to add new linked server. Fill in all the appropriate details accordingly. Follow the database name in mysql to be use as data source over here.
  • Provider string: DRIVER={MySQL ODBC 5.3 ANSI Driver};SERVER=ip address;PORT=port number;DATABASE=mt4_demo;USER=username;PASSWORD=password;Option=3


  • test connection and save it.



  • after setup


  • To query the data from the table
select * FROM OPENQUERY(MT4DBDEMONew, 'SELECT * FROM mt4_trades')




Running SSIS package in a database scheduler

Copy excel file/ csv file into the table daily repetitiously.

Below is the guide to set the SSIS and use the generate package file in the job scheduler in MSSQL.

SSIS Setup

  •  Tasks -> Import data


  • client ‘Next’


  • select ‘Flat file source’


  • Select the file, change text qualifier to ‘ ” ‘, uncheck the check box if first row is data


  • click ‘Next’


  • Specify the database server name, type of authentication and database name


  • assign the destination table where data copy into. Click ‘Edit Mapping’ to set the mapping column


  • map the column in csv with the column in the table


  • check and click ‘Next’


  • Only Enterprise version allow to save package (Express version cannot). check the Save SSIS package.


  • click ‘Next’


  • specify the package name and click ‘Next’


  • click ‘Finish’


Database Job Scheduler

  • Create a new job under SQL Server Agent


  • Set the step to execute the package


  • set the package file to be executed


  • set the scheduler time


Job done!! you can test it before leave it for everyday process.

Simple way of adding a row of textboxes dynamically for input

How to add a row of column dynamically when user click the link to add new row?

Below illustration were done in MVC framework whereby as it is not as easy as using the control directly in web form. These concerns are populate data into the drop down list, passing back all newly added data to the controller and retrieving all data for display when page load.


In my view page, I have added the below code.

dynamicAdd2In script section, I have added a few function calls in document.ready. when page load, those method will be trigger.

dynamicAdd3In initRelationship(), is to retrieve stored values to be display in the textboxes. The first ajax postback is to retrieve a list of objects of data to be display and second ajax postback is to retrieve a list of relationship type to be display in the dropdownlist. After that, it will loop through the list of relationship type to check which one is the selected one based on the data get from list of objects. After that, all the options will be added to a string of HTML code to be appended to the div tag.

dynamicAdd6When ‘add another account’ link is click, below code will be trigger to add a new row. I have used ajax to get the list of relationship type to added to dropdownlist options before append the string of HTML code to the div tag.

dynamicAdd4Below method is just solely to assigned values to the rows of textboxes if anything left out populated into the UI controls. Can ignore this is above have done it.dynamicAdd5How to pass all these data back to the controller to be process? For all the UI controls above, the name must be the same eg. p_Relationship, p_Relationship[1]…in array format. It will automatically populated into the list in the model.



When it post back to controller, you will get all the data to be process!! dynamicAdd8