G
Guest
MY purpose is that develop a web form with textboxes to display database
contents.
In design time, I follow the .Net document and click data binding property
field in each TextBox, select the corresponding colunm name of database table
to each textbox.
In the Page_Load procedure, I type me.databind().
Compiling is OK. When I run it, I got the following error message.
Did I do any thing wrong? How to do it?
Thank you for your help.
David
System.IndexOutOfRangeException: Index 0 is not non-negative and below total
rows count.
Source Error:
Line 11: <body MS_POSITIONING="GridLayout">
Line 12: <form id="Form1" method="post" runat="server">
Line 13: <asp:TextBox id="txtFirstName" style="Z-INDEX: 101; LEFT: 216px;
POSITION: absolute; TOP: 184px"
Line 14: runat="server" Width="200px" Text='<%#
DataBinder.Eval(dsPatients, "Tables[Patients].DefaultView.[0].FirstName") %>'>
Line 15: </asp:TextBox>
contents.
In design time, I follow the .Net document and click data binding property
field in each TextBox, select the corresponding colunm name of database table
to each textbox.
In the Page_Load procedure, I type me.databind().
Compiling is OK. When I run it, I got the following error message.
Did I do any thing wrong? How to do it?
Thank you for your help.
David
System.IndexOutOfRangeException: Index 0 is not non-negative and below total
rows count.
Source Error:
Line 11: <body MS_POSITIONING="GridLayout">
Line 12: <form id="Form1" method="post" runat="server">
Line 13: <asp:TextBox id="txtFirstName" style="Z-INDEX: 101; LEFT: 216px;
POSITION: absolute; TOP: 184px"
Line 14: runat="server" Width="200px" Text='<%#
DataBinder.Eval(dsPatients, "Tables[Patients].DefaultView.[0].FirstName") %>'>
Line 15: </asp:TextBox>