Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used image as hyperlink.

Whenever clik on the image store procedure is called ,and below ProductID is passed bt at that time above error ouccured..

and store procedure work perfectly....
HTML
<asp:HyperLink ID="hl" runat="server"
NavigateUrl='<% # "~/Product/ProductDetails.aspx?ProductID=" + Eval("ProductID") %>'>
           <asp:Image ID="imgProduct" runat="server" ImageUrl='<%# Eval("ImagePath") %>' /></asp:HyperLink>
Posted
Updated 23-Mar-13 5:00am
v4
Comments
Prasad Khandekar 23-Mar-13 14:22pm    
It may be because in your query you have not selected the productId column.

1 solution

Which part of the error is confusing?

System.Data.DataRowView' does not contain a property with the name 'ProductID'.
It clearly specifies that the datasource specified for the grid has no ProductID column. A simple DEBUGGING will tell you what is fetched back from DB and if there is any field named ProductID.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900