الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

الاستعلام عن الناتج المختار

مغلق
بدأه KARIMSOFT في 27 ديسمبر 2005 · 4 رد · 507 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركات

وفققكم الله الي كل الجنة

كيف يمكن حصر اختيارات المستخدم

	
oleDbDApQuestion.Fill(dataSet11.pQuestion);
oleDbDAtAnswer.Fill(dataSet11.tAnswer);
ListBox1.DataBind();
ListBox2.DataBind();
try
{
for(int nQuestion=1;nQuestion<dataSet11.pQuestion.Rows.Count+1;nQuestion++)
{
Label labQ =new Label();
string sConNameQ="labQ"+nQuestion;
labQ.ID=sConNameQ;
ListBox1.SelectedIndex=nQuestion-1;
ListBox2.SelectedIndex=nQuestion-1;
labQ.Text=ListBox1.SelectedItem.Text.ToString();	
labQ.BackColor=System.Drawing.Color.Cyan;
Panel1.Controls.Add(labQ);
      
dataView2.RowFilter="nQuestionCode="+nQuestion;
if(ListBox2.SelectedItem.Text=="S")
{
RadioButtonList  RadioButtonListA=new RadioButtonList(); 
     	 RadioButtonListA.ID="RadioButtonListA"+nQuestion;
     	 RadioButtonListA.DataSource =dataView2; 
     	 RadioButtonListA.DataTextField="sAnswerTxt";
     	 RadioButtonListA.DataValueField="nQuestionCode";
     	 RadioButtonListA.DataBind();

                 Panel1.Controls.Add(RadioButtonListA);
  }
  else
  {
     	 CheckBoxList CheckBoxListA=new CheckBoxList(); 
     	 CheckBoxListA.ID="CheckBoxListA"+nQuestion;
     	 CheckBoxListA.DataSource =dataView2; 
     	 CheckBoxListA.DataTextField="sAnswerTxt";
     	 CheckBoxListA.DataValueField="nQuestionCode";
     	 CheckBoxListA.DataBind();
     	 Panel1.Controls.Add(CheckBoxListA);
      }
////////////////////////
private void GetVal_Click(object sender, System.EventArgs e)
  {
 	 RadioButtonList l;
 	 l = (RadioButtonList) Panel1.FindControl("RadioButtonListA1");
 	 Button1.Text=l.SelectedItem.Value.ToString();
  }

تم تعديل هذه المشاركة بواسطة walcom في 28 ديسمبر 2005 في 12:37

#2

السؤال غير واضح

#3

السلام عليكم ورحمة الله وبركاته

بعد اخيار المستخدم من RadioButtonList وضغط زر حفظ يسحل اول اختيار رغم اختيار المستخدم شيء غيؤ الاخيار الاول

#4
KARIMSOFT كتب:
السلام عليكم ورحمة الله وبركاته

بعد اخيار المستخدم من RadioButtonList وضغط زر حفظ يسحل اول اختيار رغم اختيار المستخدم شيء غيؤ الاخيار الاول

هذا الخطأ شائع جداً

أدخل الشفرة التي تقوم بملء RadioButtonList بين

If not ispostback then

End if

logo.gif
استضافة ويندوز


اقتباس

مساحة تبدأ من 2000 ميجا بايت بسعر 1.99 دولار شهريا.ا

اقتباس

ASP.NET 1.1-2.0-3.0-3.5-4.0-4.5.1 / MVC ASP.NET / PHP 5.x / ColdFusion / MSSQL 2008 & 2012 / MYSQL

#5

السلام عليكم ورحمة الله وبركاته

شكرا للاخsmiling4ever

ولكن عن

أدخل الشفرة التي تقوم بملء RadioButtonList بين

If not ispostback then

End if

لا يقوم بتحملي RadioButtonList ولا تظهر ممكن مثال توضحي

هذا الموضوع مغلق.

مواضيع مشابهة