aspnet-devexpress-dot-web-dot-aspxpopupcontrolbase.md
Specifies the ASPxPopupControl‘s or ASPxDockPanel‘s client programmatic identifier.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string ClientInstanceName { get; set; }
<DefaultValue("")>
Public Property ClientInstanceName As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A control’s client identifier.
|
Use the ClientInstanceName property to specify a unique client-side identifier for the ASPxPopupControl/ASPxDockPanel control. Use this identifier on the client side to programmatically access the ASPxClientPopupControl/ASPxClientDockPanel object.
The ClientInstanceName property is important when a control is contained in a naming container, for instance, in an ASPxPageControl‘s page.
If the ClientInstanceName property is not specified for a control, the control’s client identifier is generated automatically, and equals the value of the control’s ID property. Note that in this case, client-side programmatic access to the control is not allowed when the control is contained in a naming container.
<script>
function click(s, e) {
ClientPopupControl.PerformCallback();
}
</script>
<dx:ASPxButton ID="ShowButton" runat="server" Text="Show Popup Window" AutoPostBack="False"/>
<dx:ASPxPopupControl ID="PopupControl" runat="server" ClientInstanceName="ClientPopupControl" LoadContentViaCallback="OnFirstShow"
PopupElementID="ShowButton" ShowFooter="True" Width="310px" Height="160px" HeaderText="Updatable content" >
<ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl" runat="server">
The content of this popup control was updated at
<b> <%= DateTime.Now.ToLongTimeString() %></b>
</dx:PopupControlContentControl>
</ContentCollection>
<FooterTemplate>
<dx:ASPxButton ID="UpdateButton" runat="server" Text="Update Content" AutoPostBack="False">
<ClientSideEvents Click="click" />
</dx:ASPxButton>
</FooterTemplate>
</dx:ASPxPopupControl>
<script>
function click(s, e) {
dateTimePanel.Show();
}
</script>
<dx:ASPxButton ID="ShowButton" runat="server" Text="Show Date & Time" AutoPostBack="False">
<ClientSideEvents Click="click" />
</dx:ASPxButton>
<dx:ASPxDockPanel runat="server" ID="DateTimePanel" PanelUID="DateTime" HeaderText="Date & Time" ClientInstanceName="dateTimePanel">
<ContentCollection>
<dx:PopupControlContentControl>
<widget:DateTime ID="DateTimeWidget" runat="server" />
</dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxDockPanel>
If the ClientInstanceName property contains special characters, for instance, the dot (.), you cannot access a client object by this name. Call the GetByName(name) method to retrieve the client-side object instead.
<dx:ASPxTextBox ... ClientInstanceName="SomeType.SomeProp" />
var txt = ASPxClientControl.GetControlCollection().GetByName("SomeType.SomeProp");
txt.SetText("Some Text");
See Also