Hi All, I have UserControl and I need to add (generate) some tags, basically Input tags. Later on on postback I need collect values from these inputs. I use Render method to generate Inputs, but I dont know how can I get the values from these inputs on Postback. I do have unique id for each Input.
Code form Render method:
writer.Write(string.Format("<p>{0}</p>", Resources.CustomControls.inpCodeRestriction));
writer.RenderBeginTag(HtmlTextWriterTag.P);
writer.RenderBeginTag(HtmlTextWriterTag.Span);
writer.Write(product.Name);
writer.RenderEndTag();
TextBox tb = new TextBox();
tb.ID = string.Format("code{0}{1}", item.Id, item.ProductId);
tb.Text = string.Empty;
tb.ToolTip = Resources.CustomControls.titCodeRestriction;
tb.RenderControl(writer);
writer.RenderEndTag();
How can I get the value of Input on Postback. I tried Page.FindControl(), but it does not work for me.
Thanks for any advice.