动态控件和SQL DB [英] Dynamic Controls and SQL DB

查看:72
本文介绍了动态控件和SQL DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题的人!!
我试图根据下拉列表中的多少项创建一些文本框
页面中已经存在的

将这些文本框的值插入DB SQL中需要做些什么


你能帮我的忙吗?

我已经使用Jquery和Json做到了,但是我需要使用ASP.net

i have problem guys!!
i am trying to create some text boxes dependence on how many items in Drop Down List
which already exist in the page

what i need to do to insert values of those text boxes into DB SQL


can you help me with ideas?

i already did it with Jquery and Json but i need to do it with ASP.net

推荐答案

真的,您最好的选择是坚持使用AJAX和JSON,因为如果您动态创建控件时,您将很难从动态创建的控件中获取值,因为它们不会足够早地出现在控件树中(在page_load之前)以恢复视图状态.无论如何还是更好,如果您不需要,为什么还要发帖?
Really, your best bet is to stick with AJAX and JSON, because if you create controls dynamically, you will struggle to get the values from dynamically created controls because they won''t be in the control tree early enough ( before page_load ) for viewstate to be restored. It''s better anyhow, why would you post back if you don''t need to ?


这篇关于动态控件和SQL DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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