Hiding Text under IFrame(MVC3)

Posted by Nagababu under ASP.NET on 8/10/2012 | Points: 10 | Views : 2518 | Status : [Member] | Replies : 0
Hi All,

I am facing a issue with iframe, my menu options goes hiding under iframe. In my iframe i am displaying the report.
I am using Asp.net 4.0,C# and MVC3 technologies.

Please help me to resolve this issue.

Please find the below code:


<iframe id="ifPDF" src='@Url.Action("GetMyReport", "sample")' class="sampleClass">


public ActionResult GetMyReport()
byte[] result = null;
string mimeType = Constants.applicationpdf;
if (BaseData.GetSessionValue(Constants.ReportBytes) != null)
result = (byte[])BaseData.GetSessionValue(Constants.ReportBytes);
if (result == null)
return new HttpStatusCodeResult((int)HttpStatusCode.Accepted);
return File(result, mimeType);

we have found in some forums that adding "&amp;wmode=transparent" (or) "?wmode=transparent" wil solve the issue.
"&amp;wmode=transparent" worked fine for me when i tried it in developer tools.

but the problem here is "how to send add the parameter as above".

I have also tried below code:

<iframe id="ifPDF" src='@Url.Action("GetHtmlReport", "sample"), new{wmode="transparent"}' class="sample">

Additional Information : I am using ASP.NET MVC3(Razor).



(No response found.)

Login to post response