Click here to Skip to main content
15,897,519 members
Home / Discussions / C#
   

C#

 
GeneralRe: Oracle Stored Procedure Returns Table Pin
jm200226-Mar-04 3:53
jm200226-Mar-04 3:53 
GeneralRe: Oracle Stored Procedure Returns Table Pin
Heath Stewart26-Mar-04 4:45
protectorHeath Stewart26-Mar-04 4:45 
GeneralRe: Oracle Stored Procedure Returns Table Pin
jm200226-Mar-04 7:36
jm200226-Mar-04 7:36 
GeneralRe: Oracle Stored Procedure Returns Table Pin
Heath Stewart26-Mar-04 7:44
protectorHeath Stewart26-Mar-04 7:44 
Questionchange webservice address at runtime? Pin
visiontec25-Mar-04 12:35
visiontec25-Mar-04 12:35 
AnswerRe: change webservice address at runtime? Pin
Heath Stewart25-Mar-04 13:52
protectorHeath Stewart25-Mar-04 13:52 
AnswerRe: change webservice address at runtime? Pin
Mazdak25-Mar-04 19:54
Mazdak25-Mar-04 19:54 
GeneralDataset, Dataview, XML, RadioButtonList Question. HELP!! Pin
bentai25-Mar-04 9:59
bentai25-Mar-04 9:59 
Hi everyone, I am fairly new to C# (2 months) and I need some serious help.

I need to populate a RadioButtonList (id=rbl) with the first set of data (QUESTIONID = 1) from a XML data (sports.xml).
I am having a hard time setting the DataTextField = "CHOICETEXT" and DataValueField = "CHOICEID".
I am not even sure if this is the best xml format either.
The code below the xml will cause an error. "System.Data.DataRowView' does not contain a property with the name CHOICETEXT"

Please help me to solve this problem. Thank you in advance.

<TEST>
<QUESTION>
<QUESTIONID> 1 </QUESTIONID>
<TYPE>radio</TYPE>
<TEXT>Who is the going to win the NCAA?</TEXT>
<CHOICES>
<CHOICE>
<CHOICEID> 1 </CHOICEID>
<CHOICETEXT>UAB</CHOICETEXT>
</CHOICE>
<CHOICE>
<CHOICEID> 2 </CHOICEID>
<CHOICETEXT>Kansas</CHOICETEXT>
</CHOICE>
</CHOICES>
<ANSWER> 1 </ANSWER>
<RESPONSE>
<CORRECT>You got that right baby!.</CORRECT>
<WRONG>ARE YOU CRAZY?</WRONG>
</RESPONSE>
</QUESTION>
<QUESTION>
<QUESTIONID> 2 </QUESTIONID>
<TYPE>radio</TYPE>
<TEXT>Who is going to win the Stanley Cup?</TEXT>
<CHOICES>
<CHOICE>
<CHOICEID> 1 </CHOICEID>
<CHOICETEXT>Red Wings</CHOICETEXT>
</CHOICE>
<CHOICE>
<CHOICEID> 3 </CHOICEID>
<CHOICETEXT>Maple Leafs</CHOICETEXT>
</CHOICE>
</CHOICES>
<ANSWER> 2 </ANSWER>
<RESPONSE>
<CORRECT>You got that right baby!.</CORRECT>
<WRONG>ARE YOU CRAZY?</WRONG>
</RESPONSE>
</QUESTION>
</TEST>

DataSet ds = new DataSet();
ds.ReadXml(MapPath("sports.xml"));
DataView dv = new DataView(ds.Tables["QUESTION"]);
dv.RowFilter = "QUESTIONID = 1";
rbl.DataSource = dv;
rbl.DataTextField = "CHOICETEXT";
rbl.DataValueField = "CHOICEID";
rbl.DataBind();
GeneralRe: Dataset, Dataview, XML, RadioButtonList Question. HELP!! Pin
Heath Stewart25-Mar-04 14:03
protectorHeath Stewart25-Mar-04 14:03 
GeneralRe: Dataset, Dataview, XML, RadioButtonList Question. HELP!! Pin
bentai29-Mar-04 4:29
bentai29-Mar-04 4:29 
GeneralRe: Dataset, Dataview, XML, RadioButtonList Question. HELP!! Pin
Heath Stewart29-Mar-04 5:14
protectorHeath Stewart29-Mar-04 5:14 
GeneralPassing BStr by refrence to unmanaged dll Pin
schnee2k325-Mar-04 9:45
schnee2k325-Mar-04 9:45 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Dave Kreskowiak25-Mar-04 12:03
mveDave Kreskowiak25-Mar-04 12:03 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k325-Mar-04 12:10
schnee2k325-Mar-04 12:10 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Dave Kreskowiak25-Mar-04 12:49
mveDave Kreskowiak25-Mar-04 12:49 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k325-Mar-04 13:05
schnee2k325-Mar-04 13:05 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Heath Stewart25-Mar-04 13:46
protectorHeath Stewart25-Mar-04 13:46 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k325-Mar-04 14:21
schnee2k325-Mar-04 14:21 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Dave Kreskowiak25-Mar-04 14:56
mveDave Kreskowiak25-Mar-04 14:56 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k325-Mar-04 15:06
schnee2k325-Mar-04 15:06 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Heath Stewart26-Mar-04 3:06
protectorHeath Stewart26-Mar-04 3:06 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Heath Stewart26-Mar-04 3:18
protectorHeath Stewart26-Mar-04 3:18 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k326-Mar-04 4:27
schnee2k326-Mar-04 4:27 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
Heath Stewart26-Mar-04 4:31
protectorHeath Stewart26-Mar-04 4:31 
GeneralRe: Passing BStr by refrence to unmanaged dll Pin
schnee2k326-Mar-04 4:35
schnee2k326-Mar-04 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.