S
Steve Bishop
I'm getting an error that my view does not exist. I get this error when
trying to bind to a text box on my form:
Help apprecaited. Thanks.
Compiler Error Message: CS0103: The name 'dv1' does not exist in the
class or namespace 'ASP.Relation_with_txtBoxes_aspx'
Source Error:
Line 87: <asp:TextBox id="TextBox3" runat="server" Text='<%#
dv1(0)("CustomerNumber") %>'></asp:TextBox>
//DataAdapter Setup
OdbcDataAdapter adapter = new OdbcDataAdapter(strSQL, myConn);
//DataSet, DataAdapter & Table
DataSet objDataSet = new DataSet();
adapter.Fill(objDataSet, "dtAR1");
//Set up a filter to use the text box value...
String Filter = "CustomerNumber = 'ABF'";
objDataSet.Tables[0].DefaultView.RowFilter = Filter;
objDataSet.Tables["dtAR1"].DefaultView.RowFilter = Filter;
//Create DataTable & DataView to feed single text box values on
form.....
DataTable dtAR1 = objDataSet.Tables["dtAR1"];
DataView dv1 = new DataView(dtAR1);
dgAR1.DataSource = objDataSet.Tables["dtAR1"];
Page.DataBind();
html....
<asp:TextBox id="TextBox3" runat="server" Text='<%#
dv1(0)("CustomerNumber") %>'></asp:TextBox>
trying to bind to a text box on my form:
Help apprecaited. Thanks.
Compiler Error Message: CS0103: The name 'dv1' does not exist in the
class or namespace 'ASP.Relation_with_txtBoxes_aspx'
Source Error:
Line 87: <asp:TextBox id="TextBox3" runat="server" Text='<%#
dv1(0)("CustomerNumber") %>'></asp:TextBox>
//DataAdapter Setup
OdbcDataAdapter adapter = new OdbcDataAdapter(strSQL, myConn);
//DataSet, DataAdapter & Table
DataSet objDataSet = new DataSet();
adapter.Fill(objDataSet, "dtAR1");
//Set up a filter to use the text box value...
String Filter = "CustomerNumber = 'ABF'";
objDataSet.Tables[0].DefaultView.RowFilter = Filter;
objDataSet.Tables["dtAR1"].DefaultView.RowFilter = Filter;
//Create DataTable & DataView to feed single text box values on
form.....
DataTable dtAR1 = objDataSet.Tables["dtAR1"];
DataView dv1 = new DataView(dtAR1);
dgAR1.DataSource = objDataSet.Tables["dtAR1"];
Page.DataBind();
html....
<asp:TextBox id="TextBox3" runat="server" Text='<%#
dv1(0)("CustomerNumber") %>'></asp:TextBox>