0
у меня есть контроль в моей странице SharepointОбновить идентификатор элемента управления на странице в разделе contenttemplate из пользовательского элемента управления?
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<SharePointWebControls:UIVersionedContent UIVersion="4" runat="server">
<ContentTemplate>
<asp:Literal runat="server" id="Literal1" text="" visible="false"></asp:Literal>
i am trying to access this literal1 from a usercontrol and change the text value of this control or change the ID value of this control.
я попытался это обновить идентификатор элемента управления DIV, но didnot работу. это часть пользовательского элемента управления.
HtmlGenericControl control = (System.Web.UI.HtmlControls.HtmlGenericControl)this.Page.FindControl("literal");
if (control != null)
{
control.Attributes.Clear();
control.Attributes.Add(ID,divid);
//control.Text = divid.ToString();
//document.getElementById('var_div').setAttribute('id',val)
}
любая идея, как это будет работать никому