How to use iframe display html file from database in ASP.NET? -
i trying display html file model in view. iframe tag seems best choose, don't konw how write url "src" attribute.
i saw example using image tag display image database this:
<imag src="data:@model.imagemimetype; base64, @convert.tobase64string(model.imagedata)">
so learn case , built model html file below:
public byte[] htmldata { get; set; } public string htmltype { get; set; }
when coding in view form image tag case:
<iframe src="data:@model.htmltype; base64, @convert.tobase64string(model.htmldata)"/>
in view, shows plain text of html file. guess convert method not appropriate. should display html file using iframe tag?
Comments
Post a Comment