这里,我来通过一个Demo来说明这个应用。
需求:
1. 用户在UI上输入一个数值(比如:5),系统动态为用户加载这个数值的Url Address输入域;
2. 用户输入的Url Address内容需要通过Url格式验证;
3. 用户提交输入内容后,系统给出提交的结果
设计如下:
1. Css样式设置:
以下为引用的内容:
复制代码 代码如下:
.item
{
margin:10px;
border-bottom:solid 1px #CCC;
}
.item2
{
margin:5px;
}
.input
{
width:200px;
}
2.前台页面代码:
复制代码 代码如下:
Please input a number:
ErrorMessage="Required to input content!">
runat="server" ErrorMessage="only number is valid!" Validationexpression="^d+$">
onclick="btnCreate_Click" />
onclick="btnOK_Click" />
2. 前台页面代码:
以下为引用的内容:
复制代码 代码如下:
Please input a number:
ErrorMessage="Required to input content!">
runat="server" ErrorMessage="only number is valid!" Validationexpression="^d+$">
onclick="btnCreate_Click" />
onclick="btnOK_Click" />
说明, 动态创建的TextBox们将装载到divControls中。
12下一页阅读全文



