Get Data from SQL Server to TextBox, Dropdown and RadioButton in Asp.Net c#.

Описание к видео Get Data from SQL Server to TextBox, Dropdown and RadioButton in Asp.Net c#.

Complete CRUD Operation in Asp.Net C# LINK
   • Complete CRUD Operation in Asp.Net C#...  
Get data from SQL to textbox, dropdown and Radiobuttonlist easily in aps.net c#.
If you want to display data from SQL Server to textbox, dropdown and Radiobuttonlist this tutorial is for you. This tutorial demonstrates you how to get data from SQL database to textbox using button click in asp.net c#. You can learn how to display data from SQL table to asp.net control step by step.

This tutorial also covered how to add control in asp.net web page. How to add list item in Radiobuttonlist. How to insert data from Radiobuttonlist and get data from radio button list in asp.net c#.

Get data from SQL to textbox
Get data from SQL to dropdown
Get data from SQL to Radiobuttonlist

Code-

SqlConnection con = new SqlConnection("Data Source=ROWSHAN-PC;Initial Catalog=ProgrammingDB;User ID=sa;Password=swfit129");
protected void Button5_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand comm = new SqlCommand("select * from StudentInfo_Tab where StudentID= '" + int.Parse(TextBox1.Text) + "'", con);
SqlDataReader srd = comm.ExecuteReader();
while (srd.Read())
{
TextBox2.Text = srd.GetValue(1).ToString();
DropDownList1.SelectedValue = srd.GetValue(2).ToString();
TextBox3.Text = srd.GetValue(3).ToString();
TextBox4.Text = srd.GetValue(4).ToString();
RadioButtonList1.SelectedValue = srd.GetValue(5).ToString();
}
con.Close();
}


------
This channel covers all the programming tutorial related with .Net- C#, linq, VB, SQL, Android, HTML, CSS, jQuery, Crystal Report and Microsoft Report.
So, please subscribe and keep in touch.
   / programminggeek  

Visit my page in Facebook
  / programminggeek7  
------

More Tags
#GetDataFromSQLToAsp_Net #DisplayDataFromSQLToTextBox #Asp_NetTutorial

programminggeek,get data from sql server c#,display data from sql server to textbox in asp.net,display data from sql table to dropdownlist in asp.net c#,asp.net c#,c# tutorial,get data from sql to textbox,how to display data from database to textbox,asp.net c# with sql,how to display data from sql server database in asp.net,how to get data from sql database to textbox directly in c#,how to,asp.net dropdownlist

Комментарии

Информация по комментариям в разработке