私はupdatepanelanimationextenderを持っています。このコントロールをWebページに追加すると、コントロールのプロパティにパラメータとしてupdatepanelのIDを渡したいと思います。updatepanelanimationextenderをcodebehindに設定する
ユーザーコントロール:
public partial class Controls_UpdateProgress : System.Web.UI.UserControl
{
public string UpdatePanelID { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
UpdatePanelAnimationExtender1.TargetControlID = UpdatePanelID;
}
}
}
<cc1:updatepanelanimationextender id="UpdatePanelAnimationExtender1" runat="server" >
<Animations>
<OnUpdating>
<Parallel duration="0" >
<ScriptAction Script="onUpdating();" />
</Parallel>
</OnUpdating>
<OnUpdated>
<Parallel duration="0">
<ScriptAction Script="onUpdated();" />
</Parallel>
</OnUpdated>
</Animations>
</cc1:updatepanelanimationextender>
ウェブページ:UpdatePanel1はのUpdatePanelのIDです。
<uc1:UpdateProgress ID="UpdateProgress1" runat="server" UpdatePanelID="UpdatePanel1" />
私はエラーを取得する:
The TargetControlID of 'UpdatePanelAnimationExtender1' is not valid. The value cannot be null or empty.
を有効にしているのですか?また、 'UpdatePanelID'に何かを割り当てるのですか? –
viewstateが有効です。いつあなたはどういう意味ですか? コントロールのプロパティです –
urker