如何连续创建面板? [英] how to create panel in a row?
本文介绍了如何连续创建面板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我以编程方式创建了面板,我希望它会一个接一个地出现在一行中
所有面板都在大面板中
i created panel programmatically and i want that will appear in a row one next to each other
all the panel are in big panel
for (int i = 0; 2 > i; i++)
{
Panel p = new Panel()
{
ToolTip = "hy",
BackColor=System.Drawing.Color.Crimson,
HorizontalAlign=HorizontalAlign.Center,
CssClass = "Panel"
};
Label label = new Label()
{
Text = "Product Name"
};
Image img = new Image()
{
Height = 171
};
p.Controls.Add(img);
p.Controls.Add(label);
Panel2.Controls.Add(p);
推荐答案
尝试使用
if(! IsPostBack)
{
CALL UR CODE ...
}
页面载荷
。你的aspx页面。
如果它有效,请接受它分配费率... thnx,祝你好运。
Try to use
if(!IsPostBack)
{
CALL UR CODE...
}
in the pageload.. of ur aspx page.
if its works, plz accept it n assign rates... thnx, best of luck.
这篇关于如何连续创建面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文