please consider this scenario:
we have two web page. a simple page that contains some controls and another page that Execute first page and get output HTML. for example:
StringWriter textWriter = new StringWriter();
HttpContext.Current.Server.Execute("Blinker.aspx", textWriter);
Label1.Text= Server.HtmlEncode(textWriter.ToString());
and it returns this(for example):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> </title>
</head>
<body>
<form method="post" action="Blinker.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZKwUTjEtU7qJweOD/x+Op0ROdM+jDqyILuizFGhjOJQj" />
</div>
<div class="blink"> Some Test</div>
</form>
</body>
</html>
the problem is if I want just:
<div class="blink"> Some Test</div>
how I can get it from output html in C#?
thanks
Following are the options