R
Robert Smith
Hi, I have a web form page with a control on it. However I would like to know
when the Search button on the control has been clicked.
On my parent form I have the following
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link type="text/css" rel="stylesheet" href="main.css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:Search ID="Search1" runat="server" />
</div>
<asp:Label ID="lblSearchString" runat="server"></asp:Label>
</form>
</body>
</html>
On My Search Control on the main form I have
public partial class Search : System.Web.UI.UserControl
{
string _searchstring;
public event ClickedEventHandler Clicked;
public string SearchString
{
get { return _searchstring; }
set { value = _searchstring; }
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void lnkSearch_Click(object sender, EventArgs e)
{
_searchstring = this.txtSearch1.Text + this.txtSearch2.Text;
OnSearchClicked();
}
}
I want to be able to detect on the parent form when the lnkSearch_Click
event is called, so that I can pick up the value of SearchString .
Thanks in advance
Robert
when the Search button on the control has been clicked.
On my parent form I have the following
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link type="text/css" rel="stylesheet" href="main.css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:Search ID="Search1" runat="server" />
</div>
<asp:Label ID="lblSearchString" runat="server"></asp:Label>
</form>
</body>
</html>
On My Search Control on the main form I have
public partial class Search : System.Web.UI.UserControl
{
string _searchstring;
public event ClickedEventHandler Clicked;
public string SearchString
{
get { return _searchstring; }
set { value = _searchstring; }
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void lnkSearch_Click(object sender, EventArgs e)
{
_searchstring = this.txtSearch1.Text + this.txtSearch2.Text;
OnSearchClicked();
}
}
I want to be able to detect on the parent form when the lnkSearch_Click
event is called, so that I can pick up the value of SearchString .
Thanks in advance
Robert