Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is code which give error for type conversion....

ImageButton button = sender as ImageButton;
Query qry = new Query(Descriptor.Schema).WHERE(Descriptor.Columns.ProductId, Comparison.Equals, this.productId).ORDER_BY(Descriptor.Columns.SortOrder);
DescriptorCollection descriptors = new DescriptorController().FetchByQuery(qry);
if (descriptors != null)
{
Predicate<descriptor> match = null;
int descriptorId = 0;
int.TryParse(button.CommandArgument.ToString(), out descriptorId);
if (descriptorId > 0)
{
if (match == null)
{
match = descriptor => descriptor.DescriptorId == descriptorId;
}
Descriptor item = descriptors.Find(match);
int index = descriptors.IndexOf(item);

Error: Cannot implicitly convert type 'SubSonic.ActiveRecord<Etech.CMS.Content.ImageGallary>' to 'Etech.CMS.Content.ImageGallary'. An explicit conversion exists (are you missing a cast?)

What i have to do?
Posted
Comments
Prasad Avunoori 24-Sep-14 5:12am    
What is this SubSonic namespace? Don't specify domain specific information in question title.

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