Dear ASP.NET Programmers,
I need your help on the following case:
1. I have a page coverpage.aspx, on which I load invoice data into the
datalist control dliHospCosts. I use the stored procedure spGetHospAmounts
and load the data.
<ItemTemplate>
<TABLE id="Table77" width="100%">
<TR>
<td align="left" width="7%" valign="top">
<asp:button id="btnEditItemHosp" runat="server" Text="Edit"
CommandName="edit"></asp:button>
<asp:LinkButton id="lnkDeleteItemHosp" runat="server"
CausesValidation="False" CommandName="delete">Delete</asp:LinkButton></td>
<TD align="left">
<UL>
<LI>
<%# Databinder.Eval(Container, "DataItem.SPName") %>
</LI>
</UL>
</TD>
<TD align="right" width="10%"><%# Databinder.Eval(Container,
"DataItem.InvoiceNo") %></TD>
<TD align="right" width="10%"><%# Databinder.Eval(Container,
"DataItem.InvoiceDate", "{0:d}") %></TD>
<TD align="right" width="10%"><%# Databinder.Eval(Container,
"DataItem.ExchangeRate") %></TD>
<TD align="right" width="10%"><%# Databinder.Eval(Container,
"DataItem.WithoutUs", "{0:n}") %></TD>
<TD align="right" width="10%"><%# Databinder.Eval(Container,
"DataItem.Difference", "{0:n}") %></TD>
<TD align="right" width="10%" bgcolor="Gainsboro"><%#
Databinder.Eval(Container, "DataItem.InvoiceAmount", "{0:n}") %></TD>
</TR>
</TABLE>
</ItemTemplate>
2. I get XML string from the dataset ds and save it into a file burak.xml
and into the database as ntext.
ds.WriteXml("C:\Inetpub\wwwroot\database2\richtext \burak.xml")
Dim strXML As String
strXML = ds.GetXml
strSql = "spNewCoverPage"
myCommand.CommandText = strSql
myCommand.CommandType = CommandType.StoredProcedure
myCommand.Parameters.Clear()
myCommand.Parameters.Add("@ourFileNo", Session("selectedFileNumber"))
myCommand.Parameters.Add("@xMLData", strXML)
..
..
3. Following is the contents of the burak.xml: This is also saved in the
database as ntext.
<?xml version="1.0" standalone="yes" ?>
- <NewDataSet>
- <OtherCosts>
<ActionDesc>Airplane Ticket Arrangement</ActionDesc>
<InPrice>548</InPrice>
<InPriceCur>EUR</InPriceCur>
<OutPrice>630</OutPrice>
<OutPriceCur>EUR</OutPriceCur>
<ActionTypeID>6</ActionTypeID>
<ActionID>1001</ActionID>
</OtherCosts>
- <OtherCosts>
<ActionDesc>Airplane Ticket Arrangement</ActionDesc>
<InPrice>442</InPrice>
<InPriceCur>EUR</InPriceCur>
<OutPrice>543</OutPrice>
<OutPriceCur>EUR</OutPriceCur>
<ActionTypeID>6</ActionTypeID>
<ActionID>1003</ActionID>
</OtherCosts>
- <OtherCosts>
<ActionDesc>Ground Ambulance</ActionDesc>
<InPrice>108</InPrice>
<InPriceCur>EUR</InPriceCur>
<OutPrice>200</OutPrice>
<OutPriceCur>EUR</OutPriceCur>
<ActionTypeID>1</ActionTypeID>
<ActionID>1005</ActionID>
</OtherCosts>
- <OtherCosts>
<ActionDesc>Hotel Reservation</ActionDesc>
<InPrice>20</InPrice>
<InPriceCur>YTL</InPriceCur>
<OutPrice>30</OutPrice>
<OutPriceCur>EUR</OutPriceCur>
<ActionTypeID>9</ActionTypeID>
<ActionID>1006</ActionID>
</OtherCosts>
</NewDataSet>
4. I want to load the XML string from the database into the datalist control
dliHospCosts (same as the one on the coverpage.aspx) on another page
coverpage_generated.aspx. Since, the XML does not have a tag named
ExchangeRate (beacuse it was null), I receive the following error:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name ExchangeRate
I hope that I could explain my problem. Thanks in advance,
Buran 1 1886
Oops, I pasted the wrong XML. The correct one should be the following:
<?xml version="1.0" standalone="yes" ?>
- <NewDataSet>
- <HospCosts>
<InvoiceAmount>483.2400</InvoiceAmount>
<CurrencyOriginal>EUR</CurrencyOriginal>
<OurFileNo>M05000199</OurFileNo>
<SPName>BİLGİ HASTANESİ</SPName>
<InvoiceDate>2005-04-11T00:00:00.0000000+03:00</InvoiceDate>
<InvoiceNo>037029</InvoiceNo>
<WithoutUs>589.9400</WithoutUs>
<Difference>106.7000</Difference>
</HospCosts>
</NewDataSet>
"buran" <b@b.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl... Dear ASP.NET Programmers,
I need your help on the following case: 1. I have a page coverpage.aspx, on which I load invoice data into the datalist control dliHospCosts. I use the stored procedure spGetHospAmounts and load the data.
<ItemTemplate> <TABLE id="Table77" width="100%"> <TR> <td align="left" width="7%" valign="top"> <asp:button id="btnEditItemHosp" runat="server" Text="Edit" CommandName="edit"></asp:button> <asp:LinkButton id="lnkDeleteItemHosp" runat="server" CausesValidation="False" CommandName="delete">Delete</asp:LinkButton></td> <TD align="left"> <UL> <LI> <%# Databinder.Eval(Container, "DataItem.SPName") %> </LI> </UL> </TD> <TD align="right" width="10%"><%# Databinder.Eval(Container, "DataItem.InvoiceNo") %></TD> <TD align="right" width="10%"><%# Databinder.Eval(Container, "DataItem.InvoiceDate", "{0:d}") %></TD> <TD align="right" width="10%"><%# Databinder.Eval(Container, "DataItem.ExchangeRate") %></TD> <TD align="right" width="10%"><%# Databinder.Eval(Container, "DataItem.WithoutUs", "{0:n}") %></TD> <TD align="right" width="10%"><%# Databinder.Eval(Container, "DataItem.Difference", "{0:n}") %></TD> <TD align="right" width="10%" bgcolor="Gainsboro"><%# Databinder.Eval(Container, "DataItem.InvoiceAmount", "{0:n}") %></TD> </TR> </TABLE> </ItemTemplate>
2. I get XML string from the dataset ds and save it into a file burak.xml and into the database as ntext.
ds.WriteXml("C:\Inetpub\wwwroot\database2\richtext \burak.xml")
Dim strXML As String
strXML = ds.GetXml
strSql = "spNewCoverPage"
myCommand.CommandText = strSql
myCommand.CommandType = CommandType.StoredProcedure
myCommand.Parameters.Clear()
myCommand.Parameters.Add("@ourFileNo", Session("selectedFileNumber"))
myCommand.Parameters.Add("@xMLData", strXML)
.
.
3. Following is the contents of the burak.xml: This is also saved in the database as ntext.
<?xml version="1.0" standalone="yes" ?>
- <NewDataSet> - <OtherCosts> <ActionDesc>Airplane Ticket Arrangement</ActionDesc> <InPrice>548</InPrice> <InPriceCur>EUR</InPriceCur> <OutPrice>630</OutPrice> <OutPriceCur>EUR</OutPriceCur> <ActionTypeID>6</ActionTypeID> <ActionID>1001</ActionID> </OtherCosts> - <OtherCosts> <ActionDesc>Airplane Ticket Arrangement</ActionDesc> <InPrice>442</InPrice> <InPriceCur>EUR</InPriceCur> <OutPrice>543</OutPrice> <OutPriceCur>EUR</OutPriceCur> <ActionTypeID>6</ActionTypeID> <ActionID>1003</ActionID> </OtherCosts> - <OtherCosts> <ActionDesc>Ground Ambulance</ActionDesc> <InPrice>108</InPrice> <InPriceCur>EUR</InPriceCur> <OutPrice>200</OutPrice> <OutPriceCur>EUR</OutPriceCur> <ActionTypeID>1</ActionTypeID> <ActionID>1005</ActionID> </OtherCosts> - <OtherCosts> <ActionDesc>Hotel Reservation</ActionDesc> <InPrice>20</InPrice> <InPriceCur>YTL</InPriceCur> <OutPrice>30</OutPrice> <OutPriceCur>EUR</OutPriceCur> <ActionTypeID>9</ActionTypeID> <ActionID>1006</ActionID> </OtherCosts> </NewDataSet>
4. I want to load the XML string from the database into the datalist
control dliHospCosts (same as the one on the coverpage.aspx) on another page coverpage_generated.aspx. Since, the XML does not have a tag named ExchangeRate (beacuse it was null), I receive the following error:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property
with the name ExchangeRate
I hope that I could explain my problem. Thanks in advance,
Buran
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: olle |
last post by:
Hi everyone.
Beging a newbee to asp.net and used to work with traditional asp I have
one problem working with a datalist.
1/ I make a dataset as as session variable like
session("employees")
2/...
|
by: Ben Becker |
last post by:
I am trying to build a custom crosstab type of grid where I take some items
in a data grid and based on the content of the current item compared to the
previous item, determine if a new row in a...
|
by: Joe Van Meer |
last post by:
Hi,
Is the datalist meant for one table or can I use it to display information
from 2 different tables? Or should I be looking at a datagrid instead?
I began my code and kinda ran into a snag...
|
by: Miguel Dias Moura |
last post by:
Hello,
I created a datalist in an ASP.Net / VB page.
I display the image and price of a few products.
When a user clicks an image I want to load the page
"detail.aspx?number=id" and send the...
|
by: CVerma |
last post by:
Hi,
I have an embedded datagrid within a datalist. I am not able to
perfrom paging in the datagrid. Any ideas? Here is my code:
Here is my Simplegrid.cs file:
using System;
using...
|
by: tshad |
last post by:
Is there a way to move a row in a Datalist up or down without having to
re-read the data?
I have a datalist which has embedded Datagrids in it. I want to allow the
user to move a row up or down...
|
by: buran |
last post by:
Dear ASP.NET Programmers,
I need your help on the following case:
1. I have a page coverpage.aspx, on which I load invoice data into the
datalist control dliHospCosts. I use the stored procedure...
|
by: Patrick.O.Ige |
last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected
after doing a postBack.
I have set my CheckBoxlist AutoPostBack="True"
Any ideas what 'm doing wrong?
It seems not to...
|
by: mroffey |
last post by:
Hi everyone,
I've been having this problem and I've searched high and low, but I
can't seem to find the answer to what is probably a very simple
solution.
In a nutshell, I have a nested...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |