删除asp.net中面板内的控件 [英] remove controls inside the panel in asp.net

查看:86
本文介绍了删除asp.net中面板内的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有



i我在运行时使用asp面板在asp.net中添加一些控件...添加asp面板控件之后我想删除该面板单独控制不控制面板...我们怎么做

hi all

i am adding some controls in asp.net during run time using asp panel... after adding that asp panel control i want to remove that panel control alone not control inside the panel... how we can do this

推荐答案

你试图删除的控件是面板的子控件,所以删除面板也删除了子控件!

所以你有两个选择:

1.从一开始就将控件添加到其他容器(可能是面板的父控件) />
2.如果在删除面板之前需要将控件添加到面板 - 在移除面板之前将控件移动到其他容器(可能是面板的父级)
The controls you try to remove are child-controls of the panel, so removing the panel removes the child-controls too!
So you have two options:
1. Add the controls to other container (possibly the parent of the panel) from the beginning
2. If there is some need to add the controls to the panel before removing the panel - MOVE the controls to other container (possibly the parent of the panel) before removing the panel


这篇关于删除asp.net中面板内的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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