unit WebUserControl3;

//Tagprefix="owe" Tagname="Search"

interface

uses StrUtils, System.Data, System.Drawing, System.Web, System.Web.UI,
     System.Web.UI.WebControls, System.Web.UI.HtmlControls;
     
type
    /// <summary>
    ///		Summary description for WebUserControl3.
    /// </summary>
  TWebUserControl3 = class(System.Web.UI.UserControl)
  {$REGION 'Designer Managed Code'}
  strict private
    procedure InitializeComponent;
		procedure btnSearch_Click(sender: System.Object; e: System.Web.UI.ImageClickEventArgs);
  {$ENDREGION}
  strict private
    procedure Page_Load(sender: System.Object; e: System.EventArgs);
  strict protected
		chkSearch: System.Web.UI.WebControls.CheckBox;
		txtSearch: System.Web.UI.WebControls.TextBox;
		btnSearch: System.Web.UI.WebControls.ImageButton;
    procedure OnInit(e: System.EventArgs); override;
  end;

implementation

procedure TWebUserControl3.Page_Load(sender: System.Object; e: System.EventArgs);
begin
  // Put user code to initialize the page here

  btnSearch.Attributes.Add('onclick','return isSearchInputOK("' + txtSearch.ClientID.ToString + '");');

end;

procedure TWebUserControl3.OnInit(e: System.EventArgs);
begin
  //
  // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  //
  InitializeComponent;
  inherited OnInit(e);
end;

procedure TWebUserControl3.btnSearch_Click(sender: System.Object; e: System.Web.UI.ImageClickEventArgs);
begin
  Response.Redirect('webform7.aspx?sand=' + IfThen(chkSearch.Checked,'1','0') + '&sterm='+txtSearch.Text);
end;

{$REGION 'Designer Managed Code'}
///		Required method for Designer support - do not modify
///		the contents of this method with the code editor.
/// </summary>
procedure TWebUserControl3.InitializeComponent;
begin
	Include(Self.btnSearch.Click, Self.btnSearch_Click);
	Include(Self.Load, Self.Page_Load);
end;
{$ENDREGION}


end.
