06-12-12, 12:39 AM
السلام عليكم عندى سؤال تانى اخى
انا قومت بعمل الكود التالى و هو شغل و الحمد الله
الكود ده بيجيب كل البيانات ادخل DropDownList1 من الحقل Add_new_products
بس عايز كل مره اختار حاجة جديد من DropDownList1 يجيب الرقم لى موجود جوه الحقل id
:confused:
انا قومت بعمل الكود التالى و هو شغل و الحمد الله
كود :
If Not IsPostBack Then
Dim sql As String = "select * from Addnewproducts"
Dim ds As New DataSet
Dim da As New SqlDataAdapter(sql, con)
ds.Clear()
DropDownList1.Items.Clear()
DropDownList2.Items.Clear()
DropDownList1.DataSource = Nothing
DropDownList1.DataMember = Nothing
DropDownList1.DataSource = Nothing
da.Fill(ds, "Addnewproducts")
DropDownList1.DataSource = ds.Tables("Addnewproducts")
DropDownList1.DataValueField = "Add_new_products"
DropDownList1.DataBind()بس عايز كل مره اختار حاجة جديد من DropDownList1 يجيب الرقم لى موجود جوه الحقل id
:confused:
يَامَعْشَرَ الْجِنِّ وَالإِنسِ إِنْ اسْتَطَعْتُمْ أَنْ تَنفُذُوا مِنْ أَقْطَارِ السَّمَاوَاتِ وَالأَرْضِ فَانفُذُوا لا تَنفُذُونَ إِلاّ بِسُلْطَانٍ(33) سورة الرحمن
