且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PostBack上的自定义文本框值

更新时间:2023-11-14 17:20:52

HI,试试这个
HI , try this
foreach (Control ctrl in form1.Controls)
        {
            if (ctrl is TextBox)
            {
                //here you can store the value of textbox
                string StoreValueToDB = ((TextBox)ctrl).Text;

            }
            if (ctrl is DropDownList)
            {
                //here you can store the value of textbox
                string StoreValueToDB = ((DropDownList)ctrl).SelectedValue;
            }
        }
    }


最后#天后,我找到了解决方法:

result.TextBoxValue = Request.Form ["TB_0
FINALLY AFTER # DAYS OF SEARCH I FIND THE SOLUTION :

result.TextBoxValue = Request.Form["TB_0


ctl01"];
TB_0
ctl01"];
TB_0