Gridview ,Inner join query.Bind to label ,stored procedure -sql

Posted by Raja_89 under ASP.NET on 5/17/2017 | Points: 10 | Views : 655 | Status : [Member] | Replies : 1

I am having an sp which returns a returns from more than one table

How can i bind that value to gridview


A field in that sp
( as [ID#]

<asp:TemplateField HeaderText="City" ItemStyle-Width="150" ItemStyle-CssClass="txtBox lPad10 bdr" ItemStyle-Height="28" HeaderStyle-CssClass="GridHeader">

<asp:Label ID="lblid" runat="server" Text='<%# Eval("")%>' CssClass="control-label"></asp:Label>

if i proceed shows an error msg "DataBinding: 'System.Data.DataRowView' does not contain a property with the name ''." and in gridview



Posted by: Jitendrasoft09 on: 6/10/2017 [Member] [MVP] Starter | Points: 25

You are missing out in your gridview data source. Try to map it with lblid item template or change item accordingly.

Jitendra Kumar
If my post helps you, plz mark as an answer.

Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response