简体   繁体   English

在vb.net中编辑html文件

[英]EDIT html file in vb.net

I've created a html page which consists of a div section in the body tag. 我创建了一个html页面,该页面由body标签中的div部分组成。

How do I change the contents of inner divs based on an event in another in vb.net winform(eg: when a button is pressed)? 如何基于vb.net winform中另一个事件(例如:按下按钮时)更改内部div的内容?

   <div id="magazine">   
    <div style="background-image:url(pages/01.jpg);"></div>
    <div style="background-image:url(pages/02.jpg);"></div>
    <div style="background-image:url(pages/03.jpg);"></div>
    <div style="background-image:url(pages/04.jpg);"></div>
    <div style="background-image:url(pages/05.jpg);"></div>
    <div style="background-image:url(pages/06.jpg);"></div>
    <div style="background-image:url(pages/07.jpg);"></div>
    <div style="background-image:url(pages/08.jpg);"></div>
</div>

Give each of the DIVs an ID and runat="server" attribute. 给每个DIV分配一个ID和runat =“ server”属性。 You should then be able to reference each one from server side code. 然后,您应该能够从服务器端代码中引用每个引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM