I also wanted to use the value of the EmailTB.text in the code behind as follows
if (EmailTB.Text != " ")
{
string Username = Membership.GetUserNameByEmail(EmailTB.Text);
}
But I am getting Compiler Error Message: CS0103: The name 'EmailTB' does not exist in the current context.
Thanks
Manoj SevdaPosted Nov 12, 2011, 12:15 AM
Code is here
protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item = ListItemType.Item || e.Item = ListItemType.AlternatingItem)
{
((Label)e.Items.FindControl("EmailTB")).Text = Membership.GetUserNameByEmail(EmailTB.Text);
}
}
You Will get value when Bind ListView1 control.
Karthik AgarwalPosted Nov 11, 2011, 6:55 AM
http://msdn.microsoft.com/en-us/library/t8zbaa6f%28v=VS.90%29.aspx
------------------------------------------------------------------------------------
Please Mark as "Accepted answer" if the post solves your problem.