如何将设计代码分配给Div标签 [英] How Can I Assign Design Code To Div Tag

查看:50
本文介绍了如何将设计代码分配给Div标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将设计代码写入字符串变量,在设计页面上我已经使用了一个div标签。

所以如何通过something.aspx.vb页面将该字符串分配给该div标签

解决方案

你必须能够在代码中获得div标签,请阅读: ^ ]


确保与 id 一起,你的div必须有 runat =server,以便从后面的代码访问它。



就是这样。现在您可以访问该div并执行欲望操作。 :)



-KR


你div标签必须有属性runat =server



然后在vb.aspx你需要将该字符串分配给div如下



IDofDivTag.innerHtml = StringVarible







IDofDivTag.innerHtml = ... design-code ....

I have written design code into a string variable and on design page i have taken one div tag.
so how can i assign that string to that div tag through something.aspx.vb page

解决方案

You have to be able to get the div tag in code behind, read this: how+to+get+div+tags+in+code+behind+file[^]


Make sure that along with the id, you div must have runat="server", in order to access it from the code behind.

That's it. Now you can access that div and perform the desire operation. :)

-KR


you div tag must have attribute runat="server"

then on vb.aspx you have to assign that string to div like as follows

IDofDivTag.innerHtml = StringVarible

or

IDofDivTag.innerHtml = "...design-code...."


这篇关于如何将设计代码分配给Div标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆