Friday, 13 December 2013

How to insert data with query into table in visual studio using c#?

Firstly select the option new query from tables.

 Then a tab displays on screen from that click add and close the tab.

Then write the code for inserting data into table.

Execute SQL by clicking the symbol ! on top.

Then you can see the label one row affected.So SQL query is executed.
See data by clicking option"show table data"

Thursday, 12 December 2013

How to create a database with tables to store inputs in visual studio using c#

Take the option server explorer from  view.
On top of data connections click the image with label "connect to database".
Then you can view a tab where we have to fill database new or existing with a new name like "dbs" or any other name.

Then you can see dbs.mdf symbol,which shows database is created.
Click it and you can see many options from that select option "Tables".

From Tables click option "add new table".

Then a  tab comes where you can fill the table details.
Here you have to select the apt data type for each column.

Thursday, 5 December 2013

How to add image into a webform in visual studio using c#.

Firstly add image by clicking the option "add existing item" from the website "demo"(can give any name) on solution explorer.
Then we can select any image from computer and add it in solution explorer.
From toolbox then select "image " into web form demo1.
Then change properties of it where imageurl option is to be changed by adding image.
web form demo1 in website demo
Clicking option add existing item from website demo
Here remember to change file name to all files and select any image
Now add image from toolbox to webform like this

select image and change property by adding image into  image url like this
image added