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#.

ProgrammingGeek

3 года назад

26,046 Просмотров

Complete CRUD Operation in Asp.Net C# LINK
https://youtu.be/I5cWkoMeQIY
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.
https://www.youtube.com/c/ProgrammingGeek/playlists

Visit my page in Facebook
https://www.facebook.com/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

Тэги:

#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 #CRUD_in_asp.net #asp.net_sql_server #sql #sql_to_asp.net
Ссылки и html тэги не поддерживаются


Комментарии:

kavita sharma
kavita sharma - 22.08.2023 18:45

How crud operation( Edit, update, delete , cancel) perform on dropdownlist using gridview with coding ?

Ответить
Poornima Manogaran
Poornima Manogaran - 28.03.2023 05:32

Can you tell me how to add radio buttons in linq dataconnection in C#?

Ответить
abster ranam3
abster ranam3 - 03.01.2021 11:23

Geek indeed

Ответить
mastertech associates
mastertech associates - 28.12.2020 12:30

excellent tutorial. thanks.

Ответить
lao wang
lao wang - 17.12.2020 09:36

Thanks for sharing

Ответить
影視解析中國禁書
影視解析中國禁書 - 17.12.2020 09:21

Nice video

Ответить
global invest
global invest - 15.12.2020 09:45

Very Nice. Thank for this awesome tutorial.

Ответить
Swift Learn
Swift Learn - 12.12.2020 09:39

nice

Ответить
Amina Ali
Amina Ali - 05.12.2020 10:58

Nice demonstration. Thanks 👍😍😍👍

Ответить