.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to add radiobutton list in a detailsview or any other datacontrol

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net

I am developing a website of online examination and i want to know how to display question of my paper along with its Answer options as radio button list. And if i use any data control then how to add radiobutton list n bind that list thru database

plz reply its urgent 

View Complete Post

More Related Resource Links

radiobutton list item make visible true or false in javascript

in my project i have used one radiobuttonlist according different user login , i want to make one of radiobuttonlist item visible true or false..   please help me to solve this issue.   thanks in advance.  

How to bind two different list to dropdown base on radiobutton selection

  I have radio button and dropdown column types in sharepoint list, and apart from this i have two list. I want to bind the data to data from the two list base on the selection of radio button. If i select 'Yes' i want to bind from the one of two list, and when i select i want to bind it to another list. Is it possible in sharepoint ?. If yes can you help me out in this

Radiobutton in Sharepoint list

We are currently facing a problem with the list connection webpart and was wondering if we could get help with this us.
I have created a list A in sharepoint 2007. I have added the list on a .aspx page in the site and connected it to another list B.  The radio buttons show up on List A now which when selected based on a common item filters the items in List B. The functionality works perfectly fine.
However, List A has been grouped and has lot of items under each grouping. When the user selects midway of this list, it does not collapse but shows the entire list expanded. Is there a way we can force the list to collapse when the user selects a radio button in the list?
Would really appreciate any feedback on this.

Databound dropdown list inside detailsview filtered dependent on selected radiobuttonlist item


It's driving me mad.  I have a detailsview bound to an sqldatasource. One of the items on the data table is to get its value from a dropdown list, so I created a template field and entered a dropdownlist, then bound that to a second datasource with the selection values in it. As the values can be male or female related, I have an unbound radiobuttonlist above the dropdownlist with two values - male or female - retunring an d"m" or an "f" and I want to use this to filter the records coming from the second data source for the dropdownlist.

I can't use a normal SQL control parameter on the datasource as the selector (the male/female radiobuttons) are in the detailsview and therefore "invisible".  I set up a normal control parameter with "none" as the type.  I then set the "autopostback" value to "true" for the male/female radio buttons and tried writing in the code-behind for the "maleorfemale_SelectedIndexChanged" event and using debug lines revealed that I was getting the "m" or "f" I needed by using "findcontrol", so that's fine.

I also tried adding in the "selecting" event for the second datasource to use the value of the radiobutton item, but although the "selecting" event fires

Problem with radiobutton list when viewstate disabled



I am having an issue with dropdown list when viewstate is disabled. The selectedindexchanged event fires even for the other events on the page.

I am pasting the code bello. To reproduce the issues I am mentioning please change the selected value of the dropdownlist and then click any button the selected indexchanged event fires even thought we didnot change the value.

<%@ Page Language="C#" AutoEventWireup="true"  EnableViewState="false" %>

<script runat="server">
	protected override void OnInit(EventArgs e) {
			new ListItem("Option 1"),
			new ListItem("Option 2"),
			new ListItem("Option 3"),
	protected override void OnLoad(EventArgs e) {
		SelectedValueOnLoadLabel.Text = OptionsDropDownList.SelectedValue;

	void OptionsDropDownList_SelectedIndexChanged(object sender, EventArgs e) {
		SelectedValueOnSelectedIndexChangedLabel.Text = OptionsDropDownList.SelectedValue;

    protected void btnTest_Click(object sender, EventArgs e)
        SelectedValueOnLoadLabel.Text = OptionsDropDownList.SelectedValue;

    protected void TestButton2_Click(object sender, EventArgs e)
        SelectedValueOnLoadLabel.Text = OptionsDropDownList.SelectedValue;

populate radiobutton list


SqlConnection conn= new SqlConnection();
string qry = "select opt1,opt2,opt3 from ques where QID=" + DetailsView1.DataKey[0];
SqlCommand cmd= new SqlCommand();
SqlDataReader dr= cmd.ExecuteReader();
if (dr.HasRows)
RadioButtonList rb = (RadioButtonList)(DetailsView1.FindControl("RadioButtonList1"));
//string str = Convert.ToString(dr[0]);
rb.Items.Add(new ListItem(Convert.ToString(dr[0])));//(Convert.ToString(dr["opt1"]));


Please tell me the correct way to do this

Cascading DropDown List & RadioButton in ModalPopup Extender


I need help to integrate all of those control in asp.net page. I am using the newest AJAX control toolkit. What I want to accomplish is I have a modal popup panel with cascading dropdown list and radio button inside. The issue is the postback. RadioButton and Cascading dropdown have postback so that will cause the modal panel disappear after the postback. I just want the panel disappear after I click the ok button on the panel and send the data into a field in a page. What I did was I placed the update panel inside the popup panel. If I did that, I would see the dropdown lists automatically refresh every time by accessing the webservice. If I placed the update panel outside, the dropdown would not be triggered. Even I set the trigger for the Update Panel, it will not see that way.

radiobutton List in infopath 2010


Hi, I am having Sharepoint 2010 RTM Enterprise Trial on Windows Server 2008 SP2.

I have 4 radio buttons on my infopath 2010 form, how can i manage them such that only one would be selected at a time ?


RadioButton List Using Silverlight

Need to create radio button list so that user can select one option from the given list of the collections.

Master-Detail with the GridView, DetailsView and jQuery's ThickBox

One more article about grids from Matt Berseth. This time he shows how to create master-detail with the gridview, detailsview and jQuery's ThickBox. He writes:
So I thought I would check some of this out and along the way rebuild my Master-Detail with the GridView, DetailView and ModalPopup Controls and replace the ModalPopup with jQuery's ThickBox. I found it pretty interesting - read on to see how it went

RadioButton inside GridView, How to get it work as normal

Did you tried before to drag a RadioButton control inside a Gridivew templatefield, and then you attempt to select these RadioButtons , you will notice that the behavior of RadioButton control will be changed and it will work just like the behavior of checkbox control! the user will be able to select more than one radiobutton in the grid!

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend