Employers - Post Free Jobs
Forum guidelines
AuthorQuestion
radio button
Posted on: 14 Oct 2013
how to show the result in Radio Button from database.
I wants to show the gender in  radiobutton but that should be retrieved from database.

AuthorReply
Re: radio button
Posted on: 14 Oct 2013  
May this task helpful for u:-

if (listView1.SelectedItems.Count > 0)
            {
                ListViewItem lvi = listView1.SelectedItems[0];
                txtEmpCode.Text = lvi.SubItems[0].Text;
                txtName.Text = lvi.SubItems[1].Text;
                if (lvi.SubItems[2].Text == "Male")
                {
                    Male.Visible = true;  //Male is Radio Button
                    Female.Visible = false;  //Female is Radio Button
                }
                else if (lvi.SubItems[2].Text == "Female")
                {
                    Male.Visible = false;  //Male is Radio Button
                    Female.Visible = true; //Female is Radio Button
                }
            }
            else
            {
                txtEmpCode.Text = string.Empty;
                txtName.Text = string.Empty;               
            }   



SPONSORED BY

Offshore Software and Database Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.