Registration of my user control on .aspx page like this:
<uc:MyControl Id="MyControlId" runat="server"></uc:MyControl>
And I'm using a method that belongs to this user control on code behind of .aspx page:
MyControlId.MyMethod();
But I get this error while parsing: "Cannot create an object of type 'System.Guid' from its string representation 'MyControlId' for the 'Id' property". How can I fix this?
Note: This is not the solution I'm looking for: Cannot create an object of type 'System.Object' from its string representation
MyMethod() in user control:
public void MyMethod()
{
BindInfo();
InfoArea.Style.Add("display", "block");
}
uc:MyControlwhile your ending tag is/uc:GeneralInfodoes it even compile?MyControlclass?