|
Server error in "/ WedUser" application.
-------------------------------------------------- ------------------------------
The specified conversion is invalid.
Explanation: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: The specified conversion is invalid.
Source error:
<asp: GridView ID = "UserView" Width = "100%" runat = "server"
AutoGenerateColumns = "false">
<Columns>
</ asp: TemplateField>
Line 32: <asp: TemplateField HeaderText = "is the administrator"> <ItemTemplate>
Line 33: <asp: CheckBox ID = "IsAdminCheck" Enabled = "false" runat = "server" Checked = '<% # DataBinder.Eval (Container.DataItem, "IsAdmin")%>' />
Line 34: </ ItemTemplate>
Line 35: </ asp: TemplateField>
</ Columns>
</ asp: GridView>
Is this statement wrong: Checked = '<% # DataBinder.Eval (Container.DataItem, "IsAdmin")%>', because checked = "true", it seems like <% # DataBinder.Eval (Container.DataItem, "IsAdmin ")%> Cannot be converted to true! |
|