Is that a question or what? I'm sorry that I totally cannot understand what you are asking since the codes above does not make any sense. Apart from the coding, if I only consider your first sentense, you can do it by setting InnerHtml of the div like below.
DisplayEmailMsg.InnerHTML="<strong>This is a bold Text using InnerHTML </strong>";
DisplayEmailMsg.InnerText="It will show the plain text";
Ashutosh Pathak
Blog: http://catchcode.blogspot.com Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
Smadhu
Member
509 Points
980 Posts
how to add text in div from backend (vb.net)
Apr 22, 2012 11:43 AM|LINK
how to add text in div from backend (vb.net)
asp.net
<div id="DisplayEmailMsg" runat="server"></div>
vb.net
DisplayEmailMsg.text="some text"
AmalO.Abdull...
Contributor
3116 Points
764 Posts
Re: how to add text in div from backend (vb.net)
Apr 22, 2012 11:52 AM|LINK
you can't do that ,, div is act as a holding to controls
so you can just add inside it label and add text to it
Smadhu
Member
509 Points
980 Posts
Re: how to add text in div from backend (vb.net)
Apr 22, 2012 11:58 AM|LINK
<div id="DisplayEmailMsg" >
<label id="EmailMessage" runat="server"></label>
</div>
AmalO.Abdull...
Contributor
3116 Points
764 Posts
Re: how to add text in div from backend (vb.net)
Apr 22, 2012 12:02 PM|LINK
yes exactly and do the text thing from code behind
Ruchira
All-Star
42885 Points
7019 Posts
MVP
Re: how to add text in div from backend (vb.net)
Apr 22, 2012 01:17 PM|LINK
Hello,
Is that a question or what? I'm sorry that I totally cannot understand what you are asking since the codes above does not make any sense. Apart from the coding, if I only consider your first sentense, you can do it by setting InnerHtml of the div like below.
and in code behind
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.sriramabi
Contributor
4351 Points
1277 Posts
Re: how to add text in div from backend (vb.net)
Apr 22, 2012 06:54 PM|LINK
Hai
Ruchira answer is correct
aspx.cs side here
DisplayEmailMsg.InnerHtml = "your text here";
pls check this
http://forums.asp.net/t/1692967.aspx/1/10
thank u
AmalO.Abdull...
Contributor
3116 Points
764 Posts
Re: how to add text in div from backend (vb.net)
Apr 23, 2012 06:34 AM|LINK
iam totaly sorry , just ignore my answer and for sure Ruchira's answer is the right ..
sorry again
Ashutosh Pat...
Contributor
5737 Points
1105 Posts
Re: how to add text in div from backend (vb.net)
Apr 23, 2012 06:45 AM|LINK
use the code block below:
Blog: http://catchcode.blogspot.com
Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS