'System.Web.UI.Control.Controls' is a 'property' but is used like a 'type'
- by senzacionale
What i am doing wrong? I extend LinkButton and i get this error
Compilation Error Description: An
error occurred during the compilation
of a resource required to service this
request. Please review the following
specific error details and modify your
source code appropriately.
Compiler Error Message: CS0118:
'System.Web.UI.Control.Controls' is a
'property' but is used like a 'type'
Source Error:
Line 1084: Line 1085:
public void
@_DataBinding_control30(object
sender, System.EventArgs e) { Line
1086:
ConfirmButton.Controls.ConfirmLinkButton
dataBindingExpressionBuilderTarget;
Line 1087:
System.Web.UI.IDataItemContainer
Container; Line 1088:
dataBindingExpressionBuilderTarget =
((ConfirmButton.Controls.ConfirmLinkButton)(sender));
This is C# code:
[Localizable(true)]
public string Message
{
get { return ViewState["Message"] as string; }
set { ViewState["Message"] = value; }
}
#region Overriden
protected override void OnPreRender(EventArgs e)
{
if (!String.IsNullOrEmpty(Message))
{
WebControlUtils.SetConfirmationMessage(Page, typeof (Page), this, Message, Page.IsAsyncPostBack(),
CausesValidation);
}
base.OnPreRender(e);
}
#endregion
ASPX CODE:
<asp:TemplateField>
<ItemTemplate>
<asp:ConfirmLinkButton ID="lnkBtnDelete" runat="server" Text="Odstrani" Message="Delete?"
CommandName="DeleteAgencie" Width="50"
CommandArgument='<%# Eval("idAgencies") %>'
OnCommand="lnkBtnDelete_Command" CausesValidation="False"></asp:ConfirmLinkButton>
</ItemTemplate>
</asp:TemplateField>
Regards