Hi
according below thread I want search into 2 table
search-in-different-table/
SP
ALTER procedure [dbo].[AdminSearch]
AS
BEGIN
SELECT behcode FROM House_Info WHERE Description LIKE '%'+'Paris'+'%' UNION
SELECT Model FROM House_p WHERE Name LIKE '%'+'economy'+'%'
END
AND
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<div id="search1">
<asp:Label ID="Lblbeh" runat="server" Text='<%# Eval("behcode") %>' ></asp:Label>
<asp:Label ID="Lblname" runat="server" Text='<%# Eval("Model") %>' ></asp:Label>
</div>
</ItemTemplate>
</asp:DataList>
But below error occur
Server Error in '/behtop website' Application.
DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Model'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Model'.
Source Error:
Line 22: <div id="search1">
Line 23: <asp:Label ID="Lblbeh" runat="server" Text='<%# Eval("behcode") %>' ></asp:Label>
Line 24: <asp:Label ID="Lblname" runat="server" Text='<%# Eval("Model") %>' ></asp:Label> Line 25:
Line 26: </div>
|
Why this happen?
Thanks alot