如何在Web表单中的TD中添加 [英] How to add within td in web form

查看:97
本文介绍了如何在Web表单中的TD中添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想使用c#.net代码在asp.net设计中的td中添加

Hello All,

I want to add


例如这是我的桌子

test.html文件
within td in asp.net design using c#.net code

for example this is my table

test.html file
<div>
<table>
<tr>
<td>some text here....
</td>
</tr>
</table>
</div>



test.aspx文件



test.aspx file

<body>
<table>
<tr>
<td>Heading
</td>
</tr>
<tr>
<td>  here i want insert <div> from test.html file.
</div></td>
</tr>
</table>
</body></div>

推荐答案

你好,

如何进行小函数调用,请使用jQuery .load()函数(当然,这是在开始时添加jQuery Js参考的补充:)).

假设您有一个具有"DivToLoadIn" ID的Div,并且要使用服务器上具有的HTMl文件的内容填充它,并说"HTMLPage.htm",则以下操作将全部完成:
Hello,

How about a small function call , use jQuery .load() function (ofcurse this is in addition to adding the jQuery Js reference at the start :) ).

say you have the a Div having the "DivToLoadIn" id and you want to fill it with the contents of an HTMl File you have on the server say "HTMLPage.htm" the following will do it all :


(" span>).load(" );
("#DivToLoadIn").load("HTMLPage.htm");


此外,如果您只是想要该HTML页面中一个特定元素的内容,请说DIV"DivToGGetFrom",然后


moreover if u just want the content of one specific element in that HTML page say the DIV "DivToGGetFrom" then


(" span>).load(" );
("#DivToLoadIn").load("HTMLPage.htm #DivToGGetFrom");


检查jQuery网站,它是如此强大.

希望这是有价值的! ,祝你好运:)


check the jQuery site its so powerful.

hope this was of a value! , Good luck :)


这篇关于如何在Web表单中的TD中添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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