I am very new to asp.net. Please help me in resolving the error:
DataBinder.Eval : 'System.Data.Da taRowView' does not contain a property
with the name RENEW_EXIST.
I get the above error with the following code in aspx page
<asp:Label ID="lblRenewExi st" Visible="False" Runat="server" Text='<%#
DataBinder.Eval (Container.Data Item, "RENEW_EXIS T") %>' />
If I change DataBinder.Eval (Container.Data Item, "RENEW_EXIS T") to
Container(DataI tem."RENEW_EXIS T"), the error message is changed to
BC30367: Class 'System.Web.UI. WebControls.Dat aGridItem' cannot be
indexed because it has no default property.
PLEASE HELP!!!
Dim oDA = New System.Data.Sql Client.SqlDataA dapter()
Dim oConn = New System.Data.Sql Client.SqlConne ction()
Dim oCmd = New System.Data.Sql Client.SqlComma nd()
Dim oDs = New DataSet()
oConn = Application("Co nnString")
oDA.SelectComma nd = oCmd
oDA.TableMappin gs.AddRange(New
System.Data.Com mon.DataTableMa pping() {New
System.Data.Com mon.DataTableMa pping("Table", "SPAR_REL", New
System.Data.Com mon.DataColumnM apping() {New
System.Data.Com mon.DataColumnM apping("REL_ID" , "REL_ID"), New
System.Data.Com mon.DataColumnM apping("REL_NAM E", "REL_NAME") , New
System.Data.Com mon.DataColumnM apping("TM_OFFI CER", "TM_OFFICER "), New
System.Data.Com mon.DataColumnM apping("NUM_ACC TS", "NUM_ACCTS" ), New
System.Data.Com mon.DataColumnM apping........( "RENEW_RATE ",
"RENEW_RATE "), New System.Data.Com mon.DataColumnM apping("RENEW_L IMIT",
"RENEW_LIMI T"), New System.Data.Com mon.DataColumnM apping("RENEW_N OTICE",
"RENEW_NOTICE") , New
System.Data.Com mon.DataColumnM apping("RENEW_E XIST", "RENEW_EXIST")} )})
'SqlSelectComma nd1 '
oCmd.CommandTex t = "[sp_SPAR_SelectC mdRel]"
oCmd.CommandTyp e = System.Data.Com mandType.Stored Procedure
oCmd.Connection = oConn
oCmd.Parameters ("@CSM_ID").Val ue = Session("User_I D")
oDA.Fill(oDs, "SPAR_REL")
DataGrid1.DataS ource = oDs
DataGrid1.DataB ind()
oDA.Dispose()
oDA = Nothing
oDs.Dispose()
oDs = Nothing
oConn.Close()
oConn = Nothing