hi ,
I hope you know that we cannot show our data in iframes b'coz the main intend of iframe is to show another page output in same page.My suggestion is use DIV tag or
use another page like showresult.aspx
thn use that page into your iframe tag to display it like
<iframe id="frame1" runat ="server" src="showresult.aspx" >
</iframe>
finally the C# code for showing results in div is
LocalDBDataClassesDataContext db = new LocalDBDataClassesDataContext();
var g = from k in db.UserTabs
where k.AdminID==7
select k;
StringBuilder sb = new StringBuilder("");
foreach (var j in g)
{
sb.Append(" ID : " + j.uname + " ; PWD : " + j.pwd + "<br />");
}
frame1.InnerHtml = sb.ToString();
resdiv.InnerHtml = sb.ToString();
here I used Linq to retrieve data from database I hope you know linq.
If any doubts contact or rply.