I found that SP looks to property Text of asp:TextBox and to non existing property Value. It will be changed after IIS reset. So, when SP looks to Value filter does not work.
The answer is two write your own control ascx CustomTextBox based on asp:TextBox.
Don't forget that you can't copy usual codebehind files to SP.
First, write full codebehind file and compile it to DLL(I called it SearchTextBox.dll):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication3
{
public partial class NewTextBox : System.Web.UI.UserControl
{
protected global::System.Web.UI.WebControls.TextBox TextBox_PhoneSearch;
protected void Page_Load(object sender, EventArgs e)
{
}
public string Text
{
get { return TextBox_PhoneSearch.Text; }
set { TextBox_PhoneSearch.Text = value; }
}
public string Value
{
get
{
return TextBox_PhoneSearch.Text;
}
}
}
}
Then assign this DLL with keys and insert to the server GAC (or give special rights).
After that you can link the assemble with public key in ascx control file (without codebehind files).
NewTextBox.ascx file:
<%@ Assembly Name ="SearchTextBox, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b341d7aadf237863"%>
<%@ Control Language="C#" AutoEventWireup="true" Inherits="WebApplication3.NewTextBox" %>
<asp:TextBox ID="TextBox_PhoneSearch" runat="server" AutoPostBack="true" class="ms-sbplain" style="width: 280px;"></asp:TextBox>
Copy NewTextBox.ascx to ...\12\TEMPLATE\CONTROLTEMPLATES\
Control NewTextBox.ascx is ready to use.
We just need to register it in SP page:
<%@ Register Src="~/_controltemplates/NewTextBox.ascx" TagName="NewTextBox" TagPrefix="MyCompany" %>
And insert it to this page:
<MyCompany:NewTextBox id="TextBoxSearch" runat="server"/>