helo sir i use 4 radio button in datalist and also Bind from database.application run .then i have problem i want only one option selected both 4 radiobuttonlist how to solve it .
My Code is=
aspx
onclick="Button1Search_Click" /> | ||||||||||
Width="100%" onitemdatabound="DataList1_ItemDataBound" onselectedindexchanged="DataList1_SelectedIndexChanged1">
|
.cs part is
protected void Button_save_Click(object sender, EventArgs e)
{
con.Open();
OleDbCommand cmdEmail = new OleDbCommand("select CourseCode from AddCourse where CourseCode='" + Text_CourseCode.Text + "'", con);
OleDbDataReader drEmail = cmdEmail.ExecuteReader();
if (drEmail.HasRows)
{
while (drEmail.Read())
{
LabelError.Text = ("ERROR: Record already exists.Enter New Course Code");
// Response.Write("");
return;
}
}
con.Close();
con.Open();
OleDbCommand cmd = new OleDbCommand("insert into AddCourse([CourseCode],[CourseName],[MonthlyFees],[Package],[Duration],[Added_Date]) values('" + Text_CourseCode.Text + "','" + Text_CourseName.Text + "','" + Text_Fees.Text + "'," + Text_Package.Text + ",'" + Text_Duration.Text + "','" + indianTime + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Text_CourseCode.Text = "";
Text_CourseName.Text = "";
Text_Duration.Text = "";
Text_Fees.Text = "";
Text_Package.Text = "";
}
i need it urgent plese solve my problems.
Replies
Know the answer? Post it — somebody with the same question will find it here.