Hi
according below thread
http://www.aspforums.net/Threads/646496/use-simple-text-in-lable/
I use simple text for lable that was in datalist and bind from database
now I want do it for TextBox==>txtDes that is not in datalist and I bind it from database so I wrote below code for textbox but it didn't work...
string data = Request.QueryString["id"].ToString();
SqlCommand _cmd = new SqlCommand("ViewStore", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@id", data);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())
{
txtDes.Text = _dr["Description"].ToString();
}
_cn.close();
}
AND
protected string processText(object Objtext)
{
string text = Objtext.ToString();
Regex regex = new Regex("\\<[^\\>]*\\>");
return regex.Replace(text, string.Empty);
}
protected void Page_Load(object sender, EventArgs e)
{
processText(TxtDes.Text.ToString());
}
Where is my mistake?
Thanks alot
Neda