Forms Data Controls :: DataList : Use Radio Button For Single Choice, Check Box For Multiple Choice?

Feb 8, 2010

programming: C# 3.5

i have total of 20 questions in my sql table, it is consist of 2 type of questions:
1. Single answer -- the question that have only one answer.
2. Multiple answer -- the question that have multiple answer.

Using DataList( or another possible ways)
how do i manage to show radio button for Single choice, Check box for Multiple choice question ?

my sql data table

question_id(int) | question_type(char) | question_text | answer1(varchar) | correct1(bit) | answer2 | correct2(bit) | answer3 | correct3

desire effect:
///////Single Choice///////////////
1. This is the question, what is PPP ?
O asfasdasdfasda
O asdasdasdasdadasdasd.
O asdasdasdasdasda.

//////Multiple choice//////////
2. Following, which is correct ?
[] asdasdasdasd.
[] asdasdasdasdzxc
[] basdgwqsdasda.

View 8 Replies


Similar Messages:

Web Forms :: Display Multiple Choice Questions?

Oct 20, 2010

In my project I have a web service that returns an Exam object. This object contains a property that returns set of multiple choice questions in Questions[] array. Each Question object in Questions array contains two properties, Question and ChoiceArray. To clear things here's the code,

Exam e = service.GetExam(long CenterID);
Questions[] questions = e.Questions;
foreach(Qestion question in questions)
{
string q = question.Question;
Choice[] choice = question.Choice;
}

I need to know a way I can all of these question and their choices onto a form. Since I have these as arrays I can not bind them properly using DataList. how to display these questions and their choices on to the form and on choice selection, get the value of the selected answer for each question back.

View 1 Replies

Forms Data Controls :: FormView And Populating TextBoxes From Results Of A DropDownList Choice?

Jan 3, 2011

I am drawing a blank and need some direction.I am putting together a simple website that has a single DropDownList that is DataBound to table inside of a FormView Template.What I want to happen is when the page loads, it runs the SELECT statement and displays that result(which it does, so that part works).Where I am stuck is that if I Click the DropDownList and select another item, and display the results of that selected item in the associated Databound controls.My code is below;

[Code]....

[Code]....

View 3 Replies

Developing A Simple Web Application Which Display Questions And Multiple Choice Answers And Calculate Result

Sep 3, 2010

i am new for asp.net. i want to develop a simple web application(asp.net+c#) which display questions and multiple choice answers and calculate result. i want to know which one is the best way for me to do it.i want to use linq to sql.

View 1 Replies

C# - .NET CMS Choice For Working With External Data?

Feb 22, 2011

We need to find a .NET CMS system that does well in handling external data. Most of the data comes out of an external CRM system which is updated continuously. Some requirements:

We would like to avoid duplicating the CRM data. Meaning the CRM data should stay in the CRM system. Access to the CRM data can be handled via API, but raw db access is available as well of neccessary. It should be possible to edit the CRM data from the CMS UI, but all data needs to be saved back to the CMS db. News module Blog module Simple shop module for selling small number of t-shirts with different sizes/colors (optional) preferably MVC based (but knowing that this would limit the option too much)(optional) preferably c# based well supported, preferably with big community (was added to prevent custom solution ;) )

The focus of this question is which CMS system is good in handling external data, the other requirements are just to get an idea what kind of CMS we are after. **UPDATE** The data will be edited from CMS and CRM The user is supposed to work directly on the CRM database from both CRM and CMS system Concurrency issues are handled on DB level by optimistic concurrency. Basically an update might just fail, then the data gets reloaded and presented again to the user no data symmetrization of any kind should take place at any point

View 2 Replies

Web Forms :: Dropdown Choice Enables Textbox?

Apr 21, 2010

I have a .Net dropdown list with a bunch of choices, and the final choice is 'Other'. When a user selects the choice 'Other' I need a textbox to appear next to it. I am able to do this with 'postback,' but as I have multiple dropdown list similar to this on one page I don't want to refresh the page each time. My question is, is there a better way to go about doing this? I also have to limit the use of Javascript. I can use C# in the codebehind page.

View 5 Replies

Forms Data Controls :: Single Selection Of Radio Button Inside Gridview

Mar 4, 2010

I am developing an application using ASP.NET 3.5 with C#. In my application I have a gridview control and inside the template field of gridview I have placed a RadioButton. When I run the application and when I try to select a single radio button, it allows multiple selection of radio buttons. I have to select a single radio button.

View 8 Replies

What's Best Choice Of Web Development With Open Source Framework In 3.5

Aug 30, 2010

I am a developer and in search of open source asp.net frame work that can be totally customized as need and have user fraindly UImangement.

View 2 Replies

MVC :: Dropdownlist Default Choice And Null Values?

May 10, 2010

I have a dropdownlist on my view that is being populated from values in a database table and I've added a "--Select One--" header. Selecting a value from this list is optional (it maps to a nullable field in my table). Currently, if a user doesn't select a value from the ddl then it inserts an empty string into the field, wherease I'd prefer to keep it NULL.

View 5 Replies

Change The Exceptions From The Debug Menu But Not Seeing That Choice?

Dec 13, 2010

using vb.net 2005.I think I need to change the Exceptions from the debug menu but I"m not seeing that choice. How do I get to this window?Shown here:http://dotnetdud.blogspot.com/2009/01/clr-has-been-unable-to-transition-from.html

View 2 Replies

Javascript - What's The Best Choice For Developing Real Time Form Validation

May 9, 2010

I want to make a real time form validation in asp.net form in which when i lost focus a field it show an error or success of field entrance data i search for best way to do that .. and if i want to do the same by validating data from SQL Database ... what's the best choice for doing that ?

View 3 Replies

MS SQL Server Take More Resources Than PHP And MySQL / Good Choice For Small-medium Websites?

Apr 3, 2011

I am wondering if ASP.NET is a good choice to build small such as personal websites, blogs, photo gallery to medium websites such as online booking, medium sort of facebook!, etc?I have heard that ASP.NET and MS SQL Server take more resources than PHP and MySQL which means it could be only good for rich people who are able to pay for these resources!

View 12 Replies

To Provide The User The Choice To Change The Font Size Of Page Using C# And Css To Any Digit ?

Nov 9, 2010

i have a asp.net aspx page, which references a css file,have the font size defined in css as 2em;

want to give option to user to change this to any value he wishes

irrespective of the bad effect to display format

question, ways to achieve it easily, efficiently and the most simplest way possible

note,way should support all browsers

View 2 Replies

Php - Web Programming Choice - Language, Database, Reliable Hoster And Auto-scaling?

Sep 14, 2010

programming option?Our Web application could have 60000 database requests/second or more in future.Which is better: MS-SQL or MySQL or other?Which is better: Asp.net, PHP, JSP or other?What kind of webhosting is reliable for auto-scaling?Any good webhosters or hosting plans?

View 1 Replies

Web Forms :: How To Create A Box Who Have Controls Like Radio Button Or Check Box

Jan 27, 2011

I want build a page tha have a panel or web part or div with controls within (like radio button,check bok, botton...) and I want to drag an drop want of this control to the other web part, panel or div and know
after it what control I moved there.

View 5 Replies

Filling In A Multi-choice Field In A Sharepoint Doc-Lib Using SetDocsMetaInfo Frontpage Server Extentions RPC Method?

Jul 15, 2010

I've been given a big chunk of code which eventually calls upon the SetDocsMetaInfo method from Frontpage Server Extension RPC. This is easy enough for most document uploading and property updating, except when dealing with multichoice fields. I've been scouring through MSDN and I can't find anything on how to fill in multiple values for such a field.

The general syntax for properties is something like this: [SR|default], with the type (string in this case) followed by a pipe and then the value to be written. Does anyone know the syntax for multichoice fields?

View 1 Replies

Forms Data Controls :: Radio Buttons Within Datalist / Group Just Not Via A Datalist With Unique Names

Mar 16, 2011

Am building a Form for out intranet that runs on ASP.NET and C#, it is to be a survey from a SQL database. I have the connections setup can pull informations/Questions from the database. I am having a problem with setting up radio buttons within a datalist, ive never done this and i know they require unque names.

It is to be 4 radio buttons per question where only one can be select, i know how to group just not via a datalist with unique names

View 6 Replies

Data Controls :: Multiple Header And Child CheckBoxes In Single GridView With Check / Uncheck All Functionality?

Jul 13, 2013

I have used gridview with header template for addition   having checkall functionality. if i click header  checkbox for addition ,all the rows  checkboxes will be checked.i want to have another template for deletion with the  header checkall functionality and if i click check all ,all the checkboxes will be checked.

If i  click checkall  in the second header  template  for deletion,the first column checkboxes for addition  are also checked.

I have given code below.

<script type = "text/javascript">
function Check_Click(objRef) {
//Get the Row based on checkbox
var row = objRef.parentNode.parentNode;

[code]....

View 1 Replies

Visual Studio :: 2010: Configuration Manager: ONLY Choice Is "Any PC"; No Option For X86, X64?

Mar 4, 2011

I'm on Windows 7, x64, with Visual Studio 2010.I have an ASP.NET page with C#. The C# makes a call to PowerShell, it fails, and every post I can find via Google says the solution is simple --- set your Target Build to x86. Sounds awesome, except I can't. My only choice is "Any PC", and even if I add a new configuration and call it "x86", I can't apply it to my Project.

View 1 Replies

C# - Disable Or Enable 2nd Dropdownlist In Aspx Based On Selected Choice Of The 1st Dropdownlist Box

Apr 15, 2010

I am having a problem with disabling DropDownList based on the chice of 1st DropDownList, there is no post back occuring, and it is a template based web app here is the current code:

<script type="text/javascript">
$(function() { var dropDownList1 = $('#<%= ddlUserType.ClientID %>');
var dropDownList2 = $('#<%= ddlMember.ClientID %>'); dropDownList1.change(function(e) {
if ( jQuery("#ddlUserType").val() != "ETOC") dropDownList2.removeAttr('disabled'); e.preventDefault();
else
dropDownList2.removeAttr('enabled'); e.preventDefault(); }
} );
</script>

what is happening now is page is blank and if I remove the above code everything shows, where I am going wrong. here is the plain and final javascript code which worked:

<script language="javascript">
function CheckDropDownState(lstbox)
{
if (lstbox.selectedIndex == 3) { document.forms[0].ddlMember.disabled = 1; }
else { document.forms[0].ddlMember.disabled = 0; }
}
</script>

and thew .aspx code: <asp:dropdownlist id="ddlUserType" runat="server" onclick="CheckDropDownState(this);"></asp:dropdownlist>

View 2 Replies

Web Forms :: Radio Button Check The Checkboxes?

May 24, 2010

i have a Radio button i html table via System.Web.UI.WebControls. in the first colom is the Radio Button , and checkbox in each colom to the right, what i want is when i click the radio button it should check all the checkboxes

View 11 Replies

Data Controls :: Print Multiple GridViews On Single Button Click

Dec 14, 2012

on my webpage  having 5 gridview n when m click on PrintAll ... it combine all record in one gridview .....so wt can i do to get the Gridview as it is on after print .......n m rendering Div nt gridview . attaching code also.

gvincrement.AllowPaging = false;
gvincrement.ShowFooter = false;
// tblpan_cond.Visible = true;
gvincrement.DataSource = Session["key"];
gvincrement.DataBind();

[CODE]...

View 1 Replies

Data Controls :: Update Multiple GridView Rows On Single Button Click?

Jun 16, 2015

how can we update all rows without click on update link button,

or can we update all rows of gridview on click single "update" button instead of mutiple for everey row

View 1 Replies

Forms Data Controls :: Using Multiple Tables Within A Single DataSet And Single SqlDataSource?

May 19, 2010

I have a stored procedure that returns 3 tables within the single recordset it returns. If I set a SqlDataSource to get data from this procedure, it works, but it only returns the first table. I want to have a GridView display the data from the 2nd or 3rd table using a SqlDataSource, but I can't figure out how to specify a particular table.

While there are some posts discussing this out there, I can't get a definitive answer about whether or not this is even possible (?). In a worst-case scenario, I can create another SP that only returns the 3rd table - but that creates a little maintenance headache that I would prefer to avoid.

View 4 Replies

Data Controls :: Dynamically Check Checkbox In Second DataList If It Is Checked In First DataList

Dec 3, 2013

Here is my code through which i can generate dynamically 2 checkbox group  

DataTable dt = new DataTable();
DataList1.DataSource = dt;
DataList1.DataBind();
DataList2.DataSource = dt;
DataList2.DataBind();
  Design Page  

[code]....

  There is two checkbox group which have same datasource, so in both case same checkbox are showing and also same event is firing for both. Here is the event code  

protected void CheckBox_CheckedChanged(object sender, EventArgs e)
{
string OpService = ((CheckBox)sender).Text;
}
 
Now what i want to do is, while check one checkbox from the 1st checkbox group the same checkbox should be selected from the second checkbox group automatically, also if i deselect one checkbox that should be deselect from both checkbox group.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved