32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using System;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using Taloyhtio.CustomFBADataSource.CodeFiles;
|
|
|
|
namespace Taloyhtio.CustomFBADataSource
|
|
{
|
|
public partial class SearchParams : UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!this.IsPostBack)
|
|
{
|
|
string userName = HttpContext.Current.Request.QueryString[Constants.QUERY_STRING_USERNAME];
|
|
if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(userName.Trim()))
|
|
{
|
|
this.txtUserName.Text = userName;
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void btnSearch_Click(object sender, EventArgs e)
|
|
{
|
|
var searchParams = new CodeFiles.SearchParams(txtUserName.Text);
|
|
string url = string.Format("{0}?{1}", this.Request.Url.AbsolutePath, searchParams.ToString());
|
|
this.Response.Redirect(url);
|
|
}
|
|
}
|
|
}
|