通过asp.net中的jQuery获取动态创建的div [英] get dynamically created div via jquery in asp.net
本文介绍了通过asp.net中的jQuery获取动态创建的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在jquery和asp.net中开发一个注释系统.我现在在运行时创建div,我想在asp.net中获取那些动态创建的div,以便我对其进行处理并将其保存在数据库中.
plz帮帮我.
Hello everyone,
I am developing a comment system in jquery and asp.net. I creat divs at runtime now i want to get those dynamically created divs in asp.net so that i process them and save them in database.
plz help me.
推荐答案
请参阅以下链接
http://stackoverflow.com/questions/867916/creating-a-div-element- jQuery中 [ ^ ]
http://api.jquery.com/append/ [ http://www.mkyong.com/jquery/how-to -add-remove-textbox-dynamically-with-jquery/ [
See the below links
http://stackoverflow.com/questions/867916/creating-a-div-element-in-jquery[^]
http://api.jquery.com/append/[^]
http://www.mkyong.com/jquery/how-to-add-remove-textbox-dynamically-with-jquery/[^]
Thanks
--RA
我认为尝试在客户端上动态创建HTML元素会遇到麻烦,因为它们不在视图状态,回发完成后会丢失它们.
我建议您使用ajax或使用和更新面板从客户端保存数据,并通过部分回发来控制服务器端的所有数据.
Hi,
I think you will get into problem trying to get HTML elements created dynamically on client, because they are not in view state and you will lose them when post-back is done...
I''ll suggest that you save your data from client using ajax or to use and update panel and with partial post-back to control all on server-side.
这篇关于通过asp.net中的jQuery获取动态创建的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文