62,046
社区成员
发帖
与我相关
我的任务
分享
<table style=" margin-top:80px; width:489px; margin-left:auto; margin-right:auto;">
<tr>
<td style="width:110px;">
输入网址:http://
</td>
<td>
<asp:TextBox ID="textBoxUrl" runat="server" Width="259px"></asp:TextBox>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="下一步" onclick="Button1_Click" />
</td>
</tr>
<tr>
<td colspan="3">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="textBoxUrl"
ValidationExpression="/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/" ErrorMessage="请输入以WWW开始一个有较的地址"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
例如:</td>
<td colspan="2" style="text-align:left;">
www.google.com</td>
</tr>
</table>
ValidationExpression="/^(?!http)([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/"
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="textBoxUrl"
ValidationExpression="([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"
ErrorMessage="请输入以WWW开始一个有较的地址"></asp:RegularExpressionValidator>