Add title to a div in code behind is not appeared
I'm using Dialog popup from JQuery UI. I want to add a title to the popup and I found that only the title
of the div
should be filled.
When I write a constant value in the markup then the tit开发者_开发知识库le is appeared, but when it's added in the code behind it is not appeared.
myDiv.Attributes["title"] = "some value";
-
<div id="myDiv" class="UsersDialogClass"
runat="server" style="display: none">
Any idea!
How about:
myDiv.Attributes.Add("title", "some value");
with the fact it is on Page_Load event.
I have created a sample here, you can override your title attribute when you load the dialog.
http://jsfiddle.net/jansian/HAq7w/1/
You may use asp:Panel server control and set it ToolTip property - it will render in div with appropriate title attribute value.
精彩评论