I am saving the inner Html in the form table , in the HTML field and getting the inner Html in Code Behind like following, and I want to achieve the Name Attribute(inner html has input types elements and each input type has a name attribute, i want to get those name attribute ) here in the code behind from the innerHTML . is this possible to do So
e.g < <input name="LastName" type="text" id="LastName">
C# method
protected void GetFormHTML()
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
cmd = new SqlCommand("select * from Forms where FormId='" +
Request.QueryString["ID"].ToString() + "'", con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
dr.Read();
lblFormName.Text = dr["Name"].ToString();
DivHTML.InnerHtml = dr["HTML"].ToString().Trim();
}
dr.Close();
cmd.Dispose();
con.Close();
}