if (!string.IsNullOrEmpty(this.adultBW.Text.Trim())){
model.BW = Convert.ToDecimal(this.adultBW.Text.Trim());
}
else
{
model.BW = null;
}
有好多个文本框,我怎么能简单的把它写出来。。。。。。用循环要怎么写呢?
启动tomcat的时候总是报错;
[ERROR] 2015-12-30 14:45:05 :Context initialization failed
java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.C......
答案就在这里:求大神帮忙啊!!!!!!!!!!!!!!!!!!!
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。
你的问题问的很模糊啊,不太明白
取值的话可以循环取,写标签还是复制吧,也挺快的
循环取值,for语句复用你的标签,这样吧
你用的是GUI是吧,用GUI的话,思想可以是获得你这个面板的X轴Y轴长度,然后再设置一个数,作为离Y轴距离,另外一个数,每换行一次加文本框的时候,层层叠加,可以实现用循环,写出多个文本框出来。
string allTextBoxValues = "";
foreach (Control c in Page.Controls)
{
foreach (Control childc in c.Controls)
{
if (childc is TextBox)
{
allTextBoxValues += ((TextBox)childc).Text + ",";
}
}
}
if (allTextBoxValues != "")
{
Response.Write(allTextBoxValues);
}