标题:关于搜索按钮与搜索栏之间的问题
取消只看楼主
filliam
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-8-18
结帖率:0
 问题点数:0 回复次数:0 
关于搜索按钮与搜索栏之间的问题

怎么设置“搜搜看”这个按钮,当搜索栏中输入为空时,弹出提示“请输入关键字”
    protected void Search_Click(object sender, EventArgs e)
    {
        String theSel = RadioButtonList1.SelectedValue;
        if (theSel == "1")
        {
            Response.Redirect("ss_hp.aspx?ss=" + sstext.Text.ToString());
        }
        else
        {
            Response.Redirect("ss_hk.aspx?ss=" + sstext.Text.ToString());
        }
    }
}

<td colspan="2" bgcolor="#e9e9e8" align="left" valign="middle" style="padding-left:10px;">
            <span class="span11"> 搜 索:</span>&nbsp;
            <asp:RadioButtonList ID="RadioButtonList1" runat="server" BackColor="#e9e9e8" RepeatLayout="Flow" RepeatDirection="Horizontal" RepeatColumns=2>
              <asp:ListItem Selected=True Text="换物   " Value="1" />
              <asp:ListItem Text="换客" Value="2" />
            </asp:RadioButtonList>&nbsp;&nbsp;
            <asp:TextBox ID="sstext"  runat="server" Width="233px" />&nbsp;&nbsp;
            <asp:Button ID="Button1"  onclick="Search_Click" runat="server" Text="搜搜看" CausesValidation=false  />
搜索更多相关主题的帖子: middle 搜索 
2012-08-18 11:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-379709-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.385769 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved