<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8361015676113741525</id><updated>2024-10-06T21:28:33.216-07:00</updated><category term="connection"/><category term="delete"/><category term="insert"/><category term="select"/><category term="sql server"/><category term="sqldatasource"/><category term="update"/><category term="visual studio"/><title type='text'>Connect to SQL Server using a SqlDataSource</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://connecttosqlserver.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8361015676113741525/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://connecttosqlserver.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shuja</name><uri>http://www.blogger.com/profile/17106521310879857604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8361015676113741525.post-2782549623006922178</id><published>2009-12-27T19:41:00.000-08:00</published><updated>2009-12-27T20:44:01.606-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="connection"/><category scheme="http://www.blogger.com/atom/ns#" term="delete"/><category scheme="http://www.blogger.com/atom/ns#" term="insert"/><category scheme="http://www.blogger.com/atom/ns#" term="select"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="sqldatasource"/><category scheme="http://www.blogger.com/atom/ns#" term="update"/><category scheme="http://www.blogger.com/atom/ns#" term="visual studio"/><title type='text'>Connect to SQL Server using a SqlDataSource in Visual Studio</title><content type='html'>&lt;h1&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: normal;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;In this section, we will learn how to use SqlDataSource to handle the database operations like insertion, updating, and deleting records. The operations are performed in the following steps.&lt;br /&gt;
&lt;/div&gt;&lt;h2&gt;Create a Web Site:&lt;/h2&gt;&lt;div class=&quot;MsoNormal&quot;&gt;First create a web site in visual studio 2005 by using the option of New web site from the file menu as shown in the figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5eizAPBCzwEStKVQ5ZagleGZs60naGkCZqEbH7T3qKMj8qDt8r1H6OSNNkwaeNvSugN3jA7xLqMJqF4detTJx80GaMlrJbi0lzsC6SuHwV6gfIEFt-atqIYTe-hOv9nrEF4z_IaFP5Ua/s1600-h/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5eizAPBCzwEStKVQ5ZagleGZs60naGkCZqEbH7T3qKMj8qDt8r1H6OSNNkwaeNvSugN3jA7xLqMJqF4detTJx80GaMlrJbi0lzsC6SuHwV6gfIEFt-atqIYTe-hOv9nrEF4z_IaFP5Ua/s400/1.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5eizAPBCzwEStKVQ5ZagleGZs60naGkCZqEbH7T3qKMj8qDt8r1H6OSNNkwaeNvSugN3jA7xLqMJqF4detTJx80GaMlrJbi0lzsC6SuHwV6gfIEFt-atqIYTe-hOv9nrEF4z_IaFP5Ua/s1600-h/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;h2&gt;Design the Default.aspx page:&lt;/h2&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;Now we will put some input boxes and button on the default.aspx page which will used to insert the data in the database as shown in the following figure.&lt;/o:p&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJcRlpblUMjVQFXW5sttQNB0bnsCrfOCHasRqt05lHhPqkowr7O5fP7KbCZ3uOzChEuUAH0UlBZct82XDulWT-vah3q5lL2vf-WG6CUsvEEqeK_kDmOUHGvmRcyRhA0NQKkjZi2G0PGjce/s1600-h/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJcRlpblUMjVQFXW5sttQNB0bnsCrfOCHasRqt05lHhPqkowr7O5fP7KbCZ3uOzChEuUAH0UlBZct82XDulWT-vah3q5lL2vf-WG6CUsvEEqeK_kDmOUHGvmRcyRhA0NQKkjZi2G0PGjce/s320/2.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;As we can see, we have put two text boxes for entering Name and description and a button to save this entered information in the database.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now create a test database file in which we store the information as shown in the figure. The database file will be created in the App_Data folder.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJUqeIjXJubnHG7VthigYUACvFEV-DSHZjKRMT7d9pt6VocF6n_wj-pBkjv-tMmRm_ixCkQdnhrW7rN7xMMp5WsN2Q2w4y6wI0_1nysdrZeXXgzth0yP6hU6jn5VblLOwKr5XEF1OLyyZ0/s1600-h/3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJUqeIjXJubnHG7VthigYUACvFEV-DSHZjKRMT7d9pt6VocF6n_wj-pBkjv-tMmRm_ixCkQdnhrW7rN7xMMp5WsN2Q2w4y6wI0_1nysdrZeXXgzth0yP6hU6jn5VblLOwKr5XEF1OLyyZ0/s320/3.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJUqeIjXJubnHG7VthigYUACvFEV-DSHZjKRMT7d9pt6VocF6n_wj-pBkjv-tMmRm_ixCkQdnhrW7rN7xMMp5WsN2Q2w4y6wI0_1nysdrZeXXgzth0yP6hU6jn5VblLOwKr5XEF1OLyyZ0/s1600-h/3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJUqeIjXJubnHG7VthigYUACvFEV-DSHZjKRMT7d9pt6VocF6n_wj-pBkjv-tMmRm_ixCkQdnhrW7rN7xMMp5WsN2Q2w4y6wI0_1nysdrZeXXgzth0yP6hU6jn5VblLOwKr5XEF1OLyyZ0/s1600-h/3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now go to the server explorer and in the Data connections right click Mydatabase.mdf and select the option of modify connection as shown in figure&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCrhrf3nVAlDFUAcTYIdMFadJrKvT4ESOibvIxnY5sc3G722sWQgBhz941mOyFU1-VDuyyjesGt7lv-YONve4gjwItrH5lY7yywLcl4IWYrxfGB1Ht_2ljdVzZAvO8A41GhusFED6KJb6/s1600-h/4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCrhrf3nVAlDFUAcTYIdMFadJrKvT4ESOibvIxnY5sc3G722sWQgBhz941mOyFU1-VDuyyjesGt7lv-YONve4gjwItrH5lY7yywLcl4IWYrxfGB1Ht_2ljdVzZAvO8A41GhusFED6KJb6/s320/4.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;After selecting this option the following screen will appear.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlB5igLaaly3PGKf2YSxsKtfdiSRPvpsnOLnfpYvU2WmbnTNEudCD3Yv8ommv4u0zZ7ZVbSHm1MXuLWfoihfUpVxErY12urJLHUgIJ2Fe0cVjYRXKje1heoPBWmQHgD8O_0G9fPt1YvZzr/s1600-h/5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlB5igLaaly3PGKf2YSxsKtfdiSRPvpsnOLnfpYvU2WmbnTNEudCD3Yv8ommv4u0zZ7ZVbSHm1MXuLWfoihfUpVxErY12urJLHUgIJ2Fe0cVjYRXKje1heoPBWmQHgD8O_0G9fPt1YvZzr/s320/5.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Press the Test Connection and you will get the Test Connection Succeed Message. Now create the table as shown in the figure by selecting the Add new table.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4CuLyvkymmuh0-jUXnwpin7NGZ_Fxx7H08Pc7rgi8OrH9u7hC2PCklsNsuKoMzjgIHvdRV8Wbjm7ihaU07jnLiAak08j4C6h2yQor1Bn8YTK7H1btto2UfZNsN_1SA_pflNwY-o8p2dC2/s1600-h/6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4CuLyvkymmuh0-jUXnwpin7NGZ_Fxx7H08Pc7rgi8OrH9u7hC2PCklsNsuKoMzjgIHvdRV8Wbjm7ihaU07jnLiAak08j4C6h2yQor1Bn8YTK7H1btto2UfZNsN_1SA_pflNwY-o8p2dC2/s320/6.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now create the table fields as shown in the below figure. &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;There are three fields Id as primary key, name and description as varchar in this table. Remember that while primary key is selected, Change the property of &lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;“Is Identity”&lt;/i&gt; to Yes as encircle in the given figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_IlCAhQBN638m-UsZi1SkuaBjoU9waUiMS7nF5vU7jLM_QE_z0G-FOVdTKXxPefeDNCJdUzDfZDFfKsbT1qCseBTidFmNR7X70yBO9EeM_jh-U088UpzdBwN6ZajcjMdoD_q3mP_PqBaF/s1600-h/7.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_IlCAhQBN638m-UsZi1SkuaBjoU9waUiMS7nF5vU7jLM_QE_z0G-FOVdTKXxPefeDNCJdUzDfZDFfKsbT1qCseBTidFmNR7X70yBO9EeM_jh-U088UpzdBwN6ZajcjMdoD_q3mP_PqBaF/s320/7.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;At this point, we have created the form and database table for saving the input from the form. Now we will make the connection from the form to database using SqlDatasource. Now drag the SqlDatasource from the toolbox and click on Configure Data Source which will open the following screen.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Select the MyDatabase.mdf in the connection and press the next button.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG8RYyxKz67peZsUw3_oGFVEhRxJq7vqGUzabimdQuQZn86rxY_fBVUmrAmftSCR-D3SmxqRGvKa9_-jyPgAP9BND49zEj5t51KX0hPBJRbr0yJY3-9Yk95Kcx6fIAm1EQcXy_pJVuJ-vo/s1600-h/8.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG8RYyxKz67peZsUw3_oGFVEhRxJq7vqGUzabimdQuQZn86rxY_fBVUmrAmftSCR-D3SmxqRGvKa9_-jyPgAP9BND49zEj5t51KX0hPBJRbr0yJY3-9Yk95Kcx6fIAm1EQcXy_pJVuJ-vo/s320/8.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;After pressing the next button, you will see the following screen. Press next again.&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0CygXiMfdaq6qOgMjGv8bPe9tLyCXGHxS7z7lY9Sp2cGDHQOjrPHR29Wp-7VkCJVGfw7FcwNeTd8qpF5wlglWMVpHxaiFXvz4NV_dGA8Jy3ORn6_xY4cDD5YlBTq994SlpYfkMz0uru9D/s1600-h/9.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0CygXiMfdaq6qOgMjGv8bPe9tLyCXGHxS7z7lY9Sp2cGDHQOjrPHR29Wp-7VkCJVGfw7FcwNeTd8qpF5wlglWMVpHxaiFXvz4NV_dGA8Jy3ORn6_xY4cDD5YlBTq994SlpYfkMz0uru9D/s320/9.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now click the * and press the Advanced option. Now check the Generate, Insert…. Option and press ok and next and at the next screen press finish.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGyYh1HX9NKU9niwZZuLQhhQ1CdC_0nuD9bGmFddxF3uEMfg_N887EzOeZHpAU9q6yoQ7y-cO5b5x_OHGXU2SdRpp0CbcpQF9OEjh6ScZg46lSLwrl27r_CqaMqSgHw2tqVvgGnt_XqAXt/s1600-h/10.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGyYh1HX9NKU9niwZZuLQhhQ1CdC_0nuD9bGmFddxF3uEMfg_N887EzOeZHpAU9q6yoQ7y-cO5b5x_OHGXU2SdRpp0CbcpQF9OEjh6ScZg46lSLwrl27r_CqaMqSgHw2tqVvgGnt_XqAXt/s320/10.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now change the view of Default.aspx to source. Here you can see the Insert parameters as shown in the following figure&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWqm1AiQKL5loWKgm1Hc5T_4An2VlM44fGpK_93ttLIpm-yWWdPIl-b6rcZ1XuimQU8skKULHPXoCby36XN4757R_ugFFJoHT3-ysm1otgc4gSy2_TcxVxH1X4sYLWsL5tFzeHRSMOszyw/s1600-h/11.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWqm1AiQKL5loWKgm1Hc5T_4An2VlM44fGpK_93ttLIpm-yWWdPIl-b6rcZ1XuimQU8skKULHPXoCby36XN4757R_ugFFJoHT3-ysm1otgc4gSy2_TcxVxH1X4sYLWsL5tFzeHRSMOszyw/s400/11.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now change this field to Form Fields as we need to take input from the text boxes which are form fields as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijgIPiT-f_WCwDcQgbFs1Y_hEGDInLYcn1dfg9txtKK-maum8mDrPbUSkxlghMG3mDjoyfNkzmPtm-mjUuRvCpkUKn0lHf_-kLGCE-7gCNYVW9rDqqLdPBOkcDCbyWxekPM8gwV6mENVpe/s1600-h/12.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijgIPiT-f_WCwDcQgbFs1Y_hEGDInLYcn1dfg9txtKK-maum8mDrPbUSkxlghMG3mDjoyfNkzmPtm-mjUuRvCpkUKn0lHf_-kLGCE-7gCNYVW9rDqqLdPBOkcDCbyWxekPM8gwV6mENVpe/s400/12.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now you can see that we have replaced the lines with form parameters. Now go to design view and double click the save button. In its handler write the following line as shown in figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfceheUkxQWFU_A6AiVX-aRlbqMGDilvh6LAN5U7a0VHhSRBF0RDe2vrSRc_SvAwhhimwTLvKWwjT_ZJZ2N4Kd3jRkxnc2OGppvkuTMknEYdR2sVCNxGuNxsooU7BWw9pxFnaruUytY-Yy/s1600-h/13.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfceheUkxQWFU_A6AiVX-aRlbqMGDilvh6LAN5U7a0VHhSRBF0RDe2vrSRc_SvAwhhimwTLvKWwjT_ZJZ2N4Kd3jRkxnc2OGppvkuTMknEYdR2sVCNxGuNxsooU7BWw9pxFnaruUytY-Yy/s400/13.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;It means that we on pressing the save button, the insert method of sqlDatasource will call and data will store in the database. Now run the application and enter name and description and press the save button as shown in the figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s320/14.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifRNtfW3NnvJCoBFa-sbrG60oqtwumrpVQjJ9thPcssy-sS1hxDIWUnAZr52V1AE8Jswl2GvKtbziaFnV57jlxH7LsWFvICJsIaDfg9HcxNpB1E-LPkKiSfr0NriQ9bbWGrb7gnXz13TAb/s1600-h/14.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now check the database table, the value is saved now as shown in the figure.&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiDNqjVb3gDtA4f1N5PSpwk0Pz7k8Zed2DMAqGWJHhYrU_8LUzmqDO8ln4z2JmmVLUGVgZvZMXiPGTeQsyraX9Q_vsTbiO6sc7Bad-hFK2N5-o_ngnZlJ_Xj0XjGxSsJpS50jLnw4XWrpZ/s1600-h/15.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiDNqjVb3gDtA4f1N5PSpwk0Pz7k8Zed2DMAqGWJHhYrU_8LUzmqDO8ln4z2JmmVLUGVgZvZMXiPGTeQsyraX9Q_vsTbiO6sc7Bad-hFK2N5-o_ngnZlJ_Xj0XjGxSsJpS50jLnw4XWrpZ/s320/15.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;For editing and deleting we can so the same procedure and instead of calling &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;&quot;&gt;SqlDataSource1.Insert()&lt;/span&gt;, we will call &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;&quot;&gt;SqlDataSource1.Update() &lt;/span&gt;in the button handler. &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;This time we also add new textbox in the form which take id as input also to tell the database which row, it should update and for deletion, we can use &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;&quot;&gt;SqlDataSource1.Delete(). &lt;/span&gt;This is explained in the section below.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now we are going to place a new text box on the form which takes id from the user&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;and a search button which will search the results on the basis of given id in this new text box as shown in the figure.&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN9LdvqZJQ83ZKiNqQRLz04DkV2f5FEGeDqmS55IJIjew7zsT6I4sHUeoPHvyNH3c0GCLjbkS_AR05iXNZCCNr5PZ-Kgztm0NgltEEbeLL5PRETSGdZ4g0LJ1MKh7vDkp4MsOpU04aZSRd/s1600-h/16.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN9LdvqZJQ83ZKiNqQRLz04DkV2f5FEGeDqmS55IJIjew7zsT6I4sHUeoPHvyNH3c0GCLjbkS_AR05iXNZCCNr5PZ-Kgztm0NgltEEbeLL5PRETSGdZ4g0LJ1MKh7vDkp4MsOpU04aZSRd/s320/16.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;To get the results on the basis of give id, we need to again configure the sqldataSource as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3gNMLHCBp_SlNjbhrghf8VzMVfba2z5CrNygWB3EQl29kHZcnHYzEbrYctDwEVbsLgrwD2h9C2LAGdx0y5f5MJh4u38lvPe9xRr0Te6gZeYHKlxfFCmNIVB71hWZ8xE019_RX2RxjylEY/s1600-h/17.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3gNMLHCBp_SlNjbhrghf8VzMVfba2z5CrNygWB3EQl29kHZcnHYzEbrYctDwEVbsLgrwD2h9C2LAGdx0y5f5MJh4u38lvPe9xRr0Te6gZeYHKlxfFCmNIVB71hWZ8xE019_RX2RxjylEY/s320/17.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;As you can see, In the wizard, we click on where&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;which open a new form from which we have selected the id in column and source as control then textbox “txtId” as control id and press Add to add this parameter and then press ok and finish the wizard. In this step, we have added a new parameter to sql data source to tell that now fetch the results on the basis of given id.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now we will write the code in the event handler of select button as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsGGCi_aX5kcRsRojKvOWjrru8qD5VTkKPOoCLsm3hLfzJiSOAS4Q5OH6FeazNgYP9kqzDHGwwOk3Yy3b1MwgJJJeju2MYZ6ocvlzgJ2ToDWPYBziZgCEmC4HZl_jyQjhceRahbUoY3rnF/s1600-h/18.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsGGCi_aX5kcRsRojKvOWjrru8qD5VTkKPOoCLsm3hLfzJiSOAS4Q5OH6FeazNgYP9kqzDHGwwOk3Yy3b1MwgJJJeju2MYZ6ocvlzgJ2ToDWPYBziZgCEmC4HZl_jyQjhceRahbUoY3rnF/s400/18.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;This code set the text boxes of name and description with the results which we get on the basis of given id now run the application and write a valid id in the text box and press select. The results will be displayed in the text fields.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;At this point, we have done with insertion and selection, now we perform the update operation. Now add a new button of Update in the form as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_EHGkGv7K5eJu8Qcd4bCs1MWvNqYcYLE5PN8NZoa37jIWoC_rMns7KUQr_LHd-gKGZfniRw6ccv9Ukn6-jeochvcu9lkT7Fp0bZ1LnM7317izZnpcVTOS9y2IuPUZOYsgBrQG3kC4hcy/s1600-h/19.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_EHGkGv7K5eJu8Qcd4bCs1MWvNqYcYLE5PN8NZoa37jIWoC_rMns7KUQr_LHd-gKGZfniRw6ccv9Ukn6-jeochvcu9lkT7Fp0bZ1LnM7317izZnpcVTOS9y2IuPUZOYsgBrQG3kC4hcy/s320/19.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now change the view to source view, where you will see the update parameters now change these parameters to form parameters as shown in the following figure as we do with the insert parameters.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMLdnmtlbKVvVJ6wRjGfdng8jEwKQkmk0S-7kDEFRm3M0vRZ5IdMPPJrdWAYck5BbeqQZa7lOZqwURwribZMSYH6oe2G55cZGNmGA-5F1zE_C4fuwEDzL9pQg7tR2jsDNAsv092RMnriM0/s1600-h/20.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMLdnmtlbKVvVJ6wRjGfdng8jEwKQkmk0S-7kDEFRm3M0vRZ5IdMPPJrdWAYck5BbeqQZa7lOZqwURwribZMSYH6oe2G55cZGNmGA-5F1zE_C4fuwEDzL9pQg7tR2jsDNAsv092RMnriM0/s400/20.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMLdnmtlbKVvVJ6wRjGfdng8jEwKQkmk0S-7kDEFRm3M0vRZ5IdMPPJrdWAYck5BbeqQZa7lOZqwURwribZMSYH6oe2G55cZGNmGA-5F1zE_C4fuwEDzL9pQg7tR2jsDNAsv092RMnriM0/s1600-h/20.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;After it, double click the update button and write the following line in its event handler to handle the update operation&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30-8um10tgVaJ1a4Cu_oU_1fpwxU5YH0KYIlopvNg2h-JHs8lgn2dTeKG19D2v4Nbu1M5dNCupUaNv5lvaKWeo_uukgsm5vHb4t51LX7Y0SVBBCRPH9XhBOHcH4PZ5QMsNGS3bF1eFj1O/s1600-h/21.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30-8um10tgVaJ1a4Cu_oU_1fpwxU5YH0KYIlopvNg2h-JHs8lgn2dTeKG19D2v4Nbu1M5dNCupUaNv5lvaKWeo_uukgsm5vHb4t51LX7Y0SVBBCRPH9XhBOHcH4PZ5QMsNGS3bF1eFj1O/s400/21.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30-8um10tgVaJ1a4Cu_oU_1fpwxU5YH0KYIlopvNg2h-JHs8lgn2dTeKG19D2v4Nbu1M5dNCupUaNv5lvaKWeo_uukgsm5vHb4t51LX7Y0SVBBCRPH9XhBOHcH4PZ5QMsNGS3bF1eFj1O/s1600-h/21.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30-8um10tgVaJ1a4Cu_oU_1fpwxU5YH0KYIlopvNg2h-JHs8lgn2dTeKG19D2v4Nbu1M5dNCupUaNv5lvaKWeo_uukgsm5vHb4t51LX7Y0SVBBCRPH9XhBOHcH4PZ5QMsNGS3bF1eFj1O/s1600-h/21.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now run the program by given a valid id into id text box and enter some information in the name and description which you want to modify for the given id and press the update button, the information will be updated now against the given id.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now we perform the final operation delete. Put another button delete on the form and switch to source view. Change the parameter for delete as we do for insert and update as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhptzq7TCOT61xIUkHuv3jebik6GuU9achKZ7Vh7ruDpxDMe1IlYl4wdf-QIkaajD-gmmupDmiUdXFXmWoYyBzdkVM53PmHaesfTuDwyHFuV67eumWNFhX56VFfB88l2YQrMBLSDOpNs3Sa/s1600-h/22.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhptzq7TCOT61xIUkHuv3jebik6GuU9achKZ7Vh7ruDpxDMe1IlYl4wdf-QIkaajD-gmmupDmiUdXFXmWoYyBzdkVM53PmHaesfTuDwyHFuV67eumWNFhX56VFfB88l2YQrMBLSDOpNs3Sa/s400/22.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhptzq7TCOT61xIUkHuv3jebik6GuU9achKZ7Vh7ruDpxDMe1IlYl4wdf-QIkaajD-gmmupDmiUdXFXmWoYyBzdkVM53PmHaesfTuDwyHFuV67eumWNFhX56VFfB88l2YQrMBLSDOpNs3Sa/s1600-h/22.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhptzq7TCOT61xIUkHuv3jebik6GuU9achKZ7Vh7ruDpxDMe1IlYl4wdf-QIkaajD-gmmupDmiUdXFXmWoYyBzdkVM53PmHaesfTuDwyHFuV67eumWNFhX56VFfB88l2YQrMBLSDOpNs3Sa/s1600-h/22.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-no-proof: yes;&quot;&gt;Now go to design view, double click the delete button and add the following line in its event handler to delete the record.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ehnE5MfHpNMkOqz3wqN-kiYz5a8o-qOshV6LVWqiMh0klYvbGbTiU6GDMC8JTx5Pi_9WIBY2iWqwuqj2vXkzzZYoRTXvW1TKNX-FEdkR8GaJcsvK3vD4YsaHmENrsRPqWk9PXjfbNeV1/s1600-h/23.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ehnE5MfHpNMkOqz3wqN-kiYz5a8o-qOshV6LVWqiMh0klYvbGbTiU6GDMC8JTx5Pi_9WIBY2iWqwuqj2vXkzzZYoRTXvW1TKNX-FEdkR8GaJcsvK3vD4YsaHmENrsRPqWk9PXjfbNeV1/s640/23.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ehnE5MfHpNMkOqz3wqN-kiYz5a8o-qOshV6LVWqiMh0klYvbGbTiU6GDMC8JTx5Pi_9WIBY2iWqwuqj2vXkzzZYoRTXvW1TKNX-FEdkR8GaJcsvK3vD4YsaHmENrsRPqWk9PXjfbNeV1/s1600-h/23.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ehnE5MfHpNMkOqz3wqN-kiYz5a8o-qOshV6LVWqiMh0klYvbGbTiU6GDMC8JTx5Pi_9WIBY2iWqwuqj2vXkzzZYoRTXvW1TKNX-FEdkR8GaJcsvK3vD4YsaHmENrsRPqWk9PXjfbNeV1/s1600-h/23.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Now run the program and test the delete functionality. &lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;There is another way of updating and deleting the record and which is using of grid view control as explain in the give section. &lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Place a grid view control on the form and set its data source to sqlDatasource1 and check the enable editing and deleting check boxes as shown in the following figure.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTtxLD9_0UdzvE33ShR2N1PV8LuZYdfEHNiU5Y5F4zXRFHjyRRWBG0VdJys_r9std6uQbO94j1ZYS0uua_msV7BAio7_0t7YBRQvvacBTpKBlhSQF-4SeMVuFzdk74djw8S2cYFN1K0P6W/s1600-h/24.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTtxLD9_0UdzvE33ShR2N1PV8LuZYdfEHNiU5Y5F4zXRFHjyRRWBG0VdJys_r9std6uQbO94j1ZYS0uua_msV7BAio7_0t7YBRQvvacBTpKBlhSQF-4SeMVuFzdk74djw8S2cYFN1K0P6W/s320/24.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;In this tutorial, we have learnt how to connect to database using SQL data source to perform the database functions like insert, update and delete.&lt;br /&gt;
&lt;/div&gt;&lt;!--EndFragment--&gt;   &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://connecttosqlserver.blogspot.com/feeds/2782549623006922178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://connecttosqlserver.blogspot.com/2009/12/connect-to-sql-server-using.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8361015676113741525/posts/default/2782549623006922178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8361015676113741525/posts/default/2782549623006922178'/><link rel='alternate' type='text/html' href='http://connecttosqlserver.blogspot.com/2009/12/connect-to-sql-server-using.html' title='Connect to SQL Server using a SqlDataSource in Visual Studio'/><author><name>Shuja</name><uri>http://www.blogger.com/profile/17106521310879857604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5eizAPBCzwEStKVQ5ZagleGZs60naGkCZqEbH7T3qKMj8qDt8r1H6OSNNkwaeNvSugN3jA7xLqMJqF4detTJx80GaMlrJbi0lzsC6SuHwV6gfIEFt-atqIYTe-hOv9nrEF4z_IaFP5Ua/s72-c/1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry></feed>