MAUI Blazor - Use Webview as component - webview

I have a MAUI .NET6 application with blazor pages and components, and I would like to display a kind of web browser inside a page, in order to display some internet content.
I tried to use the BlazorWebView, but I couldn't figure out how to use a XAML component inside a blazor component.
For now I have an iframe, but some internet content is blocked. I would like to have like a real browser.
Have you some ideas how to achieve this ?

You cannot embed XAML inside of Razor pages. Whenever you are inside of a BlazorWebView you will need to find a "web way" to fix whatever you're doing. So that would indeed be an iframe or something like that.
Another way around it would be to navigate to a .NET MAUI native page and show a WebView on that, but seeing how you describe things, that is not what you want.

Related

How to show external webpage on Sharepoint 2007?

I need to show a static html webpage in a Sharepoint 2007 environment (webpage made with Gatsby if that would matter).
Is this possible?
Hosting the page somewhere else and loading it in an iframe is also an option. Is loading external pages by means of a webpart possible?
I guess you can use the Page Viewer web part to accomplish the same.
Let me know if that helps or you need further details

Kendo drop down list doesn't work in IE10 iframe

My mvc website makes use of the Telerik Kendo mvc dll's. However the problem is that the drop down list doens't work when running it on IE10, in a website that uses frames. When I run it on its own, it works fine, however as soon as it is used on a website with frames, it brakes the drop down list and they won't expand.
I'm currently using the latest version (2012.913) of the Kendo UI for MVC.
Is there a solution for this.?
I know this is an old post, but I thought I'd share since we had the same issue and found the fix for it. Unfortunately we are forced to continue using frames as well, so we had to put this fix in place.
First thing to check is if your using compatibility mode in the browser, whether by the site being added to the compatibility list or you're on an intranet site. If you can, disable compatibility mode and that should resolve this. If you want to ensure your site isn't using compatibility mode, add this tag to your application.
The problem we had is that IE doesn't obey this setting when using frames...it will always use whatever the parent frame is set to. We had to have compatibility mode enabled for certain portions of our site, so we were in a catch-22 situation. Since there's no way around this, our final resolution was to re-direct the user behind the scenes if they navigated to the page in the iFrame.
That being said, the easiest option is to add the meta tag above if you don't need compatibility view for anything.

ReportViewer in MVC 4 partial

I am still unsure the best way to go about it.
I've read alsorts of resources, yet still no closer to a working solution.
I created a partial ASCX file. Added Report viewer to it, then rendered said partial in my CSHTML file. This was the closest I have come. In that I can see the report viewer, buttons etc. But for some reason the data never shows.
I have tried ASPX page inside an IFrame But this is not the way I want to go, about making this solution work.
Loading an ASPX page outright. But I lose my _Layout.cshtml main page style.
Some people suggest changing all sorts of things in config / Global.asax where as some say its not even necessary.
Ideally I want to have it as a partial in a page. But can deal with it being the only thing on the page, if I keep my main layout.
My experience with the older syntax / pages / non-MVC is limited to this project - trying to get this to work.
My data is linked through the components setup. The connection works fine in aspx page, as single page or iframe. But not in ascx.
The ReportView control requires ViewState to be enabled. In ASP.NET MVC such notion no longer exists. This means that you cannot use this control inside a native ASP.NET MVC view or partial. You can use it only in a classic WebForm (not in an ASP.NET MVC View) and the embed this WebForm inside an iframe within your current ASP.NET MVC view or partial. You have the possibility to render the report as an image for example and directly stream it to the response without using this control. Here's a blog post which illustrates the technique. So you could have a controller action which generates the report as a JPEG image and then link to this controller action from your view using the <img> tag. Unfortunately this makes only a static copy of the report and the user cannot interact with it.
You might also checkout this blog post which illustrates how you could run ASP.NET MVC and classic WebForms side by side.

MVC3 with jQuery mobile, having different layout page and views

I thought what I am trying to do what already built in, but it does not seem to be working. From what I understood, with asp.net MVC you can name your views like this:
_view.cshtml
_view.Mobile.cshtml
and it would use the mobile one if coming from a mobile device, and use the non-mobile one on desktops.
It is not automatically doing this for me, is there something else I need to do? I have all the jquery mobile scripts and css referenced.
As pointed out in the comments, this tutorial: asp.net/mvc/tutorials/mvc-4/aspnet-mvc-4-mobile-features is a great way to go.
My particular problem what I did not have anything in the default Shared view folder, so it was not routing correctly.

What's browser support like for bare SWF files?

Does anybody use bare .SWF files as webpages?
I know it's possible; it seems to work fine for me.
Why would I embed a SWF inside an HTML page if it's just going to be full screen (I mean the size of the browser's normal viewable page area, not COMPLETELY fullscreen)?
Is there a lack of browser support?
Or is this functionality determined by the browser's Flash plugin?
If you embed it in html page and the client doesn't have the flash plugin, most browsers show a missing plugin message. If u directly host the swf, a plugin-less browser might consider it as a download link and try to download the swf into the client machine instead of showing the missing plugin message.
My opinion is that if the browser has the Flash plugin it will render it, and it's up to you to implement how the swf behaves when you scale/resize the browser window/etc.
You can embed a swf in an HTML page and have it full browser screen offcourse, and you could interact with the browser a bit better ( some nice javascript/flash action going on ), not mention it would be more SEO/standards friendly.
I would recommend using SWFObject. Have a look at the fullpage demo.

Resources