Hi Anand,
I have made a sample that full-fill your requirement.
HTML
<div>
Enter Value :
<asp:TextBox ID="txtValue" runat="server" />
<br />
Enter Key:
<asp:TextBox ID="txtKeyWord" runat="server" />
<br />
<asp:Button ID="btnCheck" Text="Check" runat="server" OnClick="CheckKeyAvailability" />
<br />
<asp:Label ID="lblResult" runat="server" Visible="false" />
</div>
Code
protected void CheckKeyAvailability(object sender, EventArgs e)
{
string value = txtValue.Text.Trim();
string key = txtKeyWord.Text.Trim();
string result = string.Empty;
int index = value.LastIndexOf(key);
if (index != -1)
{
result = value.Substring(0, index + key.Length);
}
if (!string.IsNullOrEmpty(result))
{
lblResult.Text = result;
}
else
{
lblResult.Text = "Key not found";
}
lblResult.Visible = true;
}
Screenshot

Hope this will help you.