使用asp.net更改div的内容 [英] Change the content of the div using asp.net
本文介绍了使用asp.net更改div的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,iam banu priya
我需要通过使用asp.net来更改div的元素吗?
解决方案
首先,提供ID和runat ="server"
< div id ="divCenter" runat ="server" class ="divhead"></div>
然后使用innerHtml
字符串str =联络中心"; divCenter.InnerHtml = str;
希望对您有帮助...
yup Freind,即使您可以更改任何HTML标记的内容,这也是可能的.为此,只需将您的字符串分配给< divid> .InnerHTML =您的内容" ..
谢谢,
Ambesha
Hi iam banu priya
i need to change element of div by using asp.net is there any possible to do that??
解决方案
firstly,give id and runat="server"
<div id="divCenter" runat="server" class="divhead"></div>
then use innerHtml
string str="Contact Center"; divCenter.InnerHtml = str;
hope it helps you...
yup Freind , This is possible even you can change the content of any HTML tag. for this just asign your string to <divid>.InnerHTML ="your content"..
Thanks,
Ambesha
这篇关于使用asp.net更改div的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文