ASP.NET Linq data source - using enum in where parameters -


I have a linqdatasource and I want to use an enum for the type below:

  & lt; Asp: linqdatasource id = "GridDataSource" runat = "server" enabled = "true" ou = "type == @ type" & gt; & Lt; Whereparameters & gt; & Lt; ASP: Dynamic Corporate Parameter Controller = "FilterRipper" /> & Lt; Asp: QueryStringParameter QueryStringField = "Type" name = "Type" ConvertEmptyStringToNull = "false" /> & Lt; / Whereparameters & gt; & Lt; / ASP: linqdatasource & gt;   

This is throwing an error:

  operator '==' 'product type' and 'string' incompatible with operand types.  

ProductType is my Enum, and string is my input type. I do not think I am able to convert one into another ...

This is exactly what a similar problem can be and a lin Q can not be made inside where the segment, and linq is to do with SQL, we can not convert the string to string the string or string directly into the enum, so both can convert to int. The hard part here is feeling that you need an int32 (type) in the linux where the segment and (int) type does not work

Comments