‘System.String’ to ‘System.Guid’
April 9, 2008 at 9:45 am | In ASP.NET Tips | Leave a CommentHi Guys,
I have this working with a hyperlink field in a gridview.
<asp:HyperLinkField DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="userprofiles.aspx?UserID={0}" DataTextField="UserName" HeaderText="User Name" Text="User Name" >
I just want to same thing in a datagrid but I get this error:
<asp:HyperLink ID="HyperLinkToUserProfile" runat="server" NavigateUrl="userprofiles.aspx?UserID={0}"><%# Eval("UserName")%></asp:HyperLink>
Cannot convert value of parameter 'UserID' from 'System.String' to 'System.Guid'
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.InvalidOperationException: Cannot convert value of parameter 'UserID' from 'System.String' to 'System.Guid'
Does anyone know how to fix this?
many thanks
polynaux
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.