hello,
i am trying to find control (textbox) of html which is placed inside the text of lable of asp.net.
here is the code which i used..
anyone know how can i find the value of the textbox of this html file using asp.net c#
Thanks
i am trying to find control (textbox) of html which is placed inside the text of lable of asp.net.
here is the code which i used..
Code:
protected void Page_Load(object sender, EventArgs e)
{
StreamReader reader = new StreamReader(@"d:\WebSite1\HTMLPage.htm");
String line = reader.ReadToEnd();
Label1.Text = line;
}
protected void Button1_Click(object sender, EventArgs e)
{
string control;
foreach (Control c in form1.Controls)
{
control = c.ID;
if (control != null)
{
// ti is html textbox
HtmlGenericControl iframe = (HtmlGenericControl)c.FindControl("t1");
control = iframe.InnerText;
}
}
}
Thanks
Comment