Professional Documents
Culture Documents
Asp Textbox Asp Textbox Asp Regularexpressionvalidator
Asp Textbox Asp Textbox Asp Regularexpressionvalidator
. :
5. 6. 7. 8. 9.
<asp:TextBox ID="CommonSearchTextBox" Runat="server" CssClass="search_box" AccessKey="s" TabIndex="1"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage=" !" ControlToValidate="CommonSearchTextBox" ValidationExpression="[AZa-z$]"></asp:RegularExpressionValidator>
10. 11. <asp:GridView ID="AdsGrid" Runat="server" DataSourceID="AdSearchDataSource" AutoGenerateColumns="False" DataKeyNames="Id" AllowPaging="True" PageSize="10" AllowSorting="True" BorderWidth="0px" CssClass="item_list"> <pagersettings mode="Numeric" position="Bottom" pagebuttoncount="10"/>
<pagerstyle backcolor="#B4CFEC" height="20px" verticalalign="Bottom" horizontalalign="Center"/>
..
12. Go search :
public partial class Default_aspx : System.Web.UI.Page { public void Page_Load() { CommonSearchButton.Text=""; CommonWhatsNewButton.Text = ""; } }
13. :
public void Page_Load() { CommonSearchButton.Text=""; CommonWhatsNewButton.Text = ""; if (!Page.IsPostBack) { //first load CommonWhatsNewRangeList.Items[0].Text "; CommonWhatsNewRangeList.Items[1].Text "; CommonWhatsNewRangeList.Items[2].Text CommonWhatsNewRangeList.Items[3].Text } else { //not first load } }