ITking2009
Programmer
Hi,
What i need to do is display a specific section of the xml file on the webpage.
Here's what i am doing
i am reading the xml file into a dataset and then check for row count and if its more than one i am tying to the table.
the issue i am having is it showing correct count but when i try to display it shows "System.Data.DataRowView" in place of the value to be shown.
Following is my xml and i am having issue showing Payment Requirement section for account id 9999
<FaxForm>
<FaxFormAccountId>9999</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
<FaxFormAccountId>8888</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
<FaxFormAccountId>7777</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
</FaxForm>
here's my code to do that
string dataPath = Server.MapPath("~/App_Data/RFS.xml");
DataSet dSet = new DataSet();
dSet.ReadXml(dataPath);
DataRow[] rows = dSet.Tables[0].Select(" FaxFormAccountId = '" + ConfigurationManager.AppSettings["AccountId"]+"'");
// record validated
if (rows.Length > 0)
{
if (dSet.Tables["PaymentRequirement"].Rows.Count > 0)
{
BulletedList1.DataSource = dSet.Tables["PaymentRequirement"];
BulletedList1.DataBind();
}
}
any suggestions are appreciated.
Thanks.
What i need to do is display a specific section of the xml file on the webpage.
Here's what i am doing
i am reading the xml file into a dataset and then check for row count and if its more than one i am tying to the table.
the issue i am having is it showing correct count but when i try to display it shows "System.Data.DataRowView" in place of the value to be shown.
Following is my xml and i am having issue showing Payment Requirement section for account id 9999
<FaxForm>
<FaxFormAccountId>9999</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
<FaxFormAccountId>8888</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
<FaxFormAccountId>7777</FaxFormAccountId>
<FaxFormName>Test</FaxFormName>
<Phone>1-888-888-8888</Phone>
<Fax>1-888-999-9999</Fax>
<CaptionParagraph>
<CaptionContent>TEST1</CaptionContent>
<CaptionContent>Test2</CaptionContent>
<CaptionContent>Test3</CaptionContent>
<CaptionContent>Test4</CaptionContent>
</CaptionParagraph>
<PaymentParagraph>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
<PaymentRequirement>TESTING</PaymentRequirement>
</PaymentParagraph>
</FaxForm>
here's my code to do that
string dataPath = Server.MapPath("~/App_Data/RFS.xml");
DataSet dSet = new DataSet();
dSet.ReadXml(dataPath);
DataRow[] rows = dSet.Tables[0].Select(" FaxFormAccountId = '" + ConfigurationManager.AppSettings["AccountId"]+"'");
// record validated
if (rows.Length > 0)
{
if (dSet.Tables["PaymentRequirement"].Rows.Count > 0)
{
BulletedList1.DataSource = dSet.Tables["PaymentRequirement"];
BulletedList1.DataBind();
}
}
any suggestions are appreciated.
Thanks.