You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a string html that contains a large html including CSS for a sticky menu and a "back to top" button".
If I want to display it in a different page, it works perfectly with code:
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(htmlContent);
using (MemoryStream ms = new MemoryStream(bytes))
{
Application.DownloadAndOpen("blank", ms, $"catalog{dataValabilitate}.html");
}
But now I want to display it and replace my application page. I tried with
var p1 = new Page();
var h = new HtmlPanel();
h.Html = html;
h.Dock = DockStyle.Fill;
p1.Controls.Add(h);
p1.Show();
It is displayed, but all button/menu functions are inactive.
In css I have something like
.back-top {
position: fixed;
bottom: 20px;
left: 25px;
background: #3498db;
color: white;
padding: 10px 20px;
border-radius: 50%;
font-size: 18px;
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.back-top:hover {
background: #2c3e50;
}
....
and in html ↑
Any way to activate CSS actions? Or to display my html instead of application page?
If you want to display the HTML within your application while keeping the app active, use IFramePanel or WebBrowser control. These create a real iframe/browser context where CSS and anchor links work properly.
What I need is that: when specific conditions are met (in parameters, etc; doesn't concern the topic), I need one of the 2 posibilities:
Display the full html (with css, etc) in a webbrowser control. But I wasn't able to find HOW to execute something like
WebBrowser wb;
wb.html=myHtml; //that doesn't exist; what can I do?
Completely replace my application with myHtml. I tried:
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(html);
using (MemoryStream ms = new MemoryStream(bytes))
{
Application.DownloadAndOpen("_blank", ms, $"catalog.html");
}
Application.Navigate("javascript:window.close();");
That works, but the browser display a warning "allow pop-up" or "pop-up blocked" that prevent the opening of the new tab.
The first approach will be better, if you can tell me how to "inject" all html in WebBrowser.
Thank you for answer. Unfortunatelly, myHTML is too big to use that method. If you khow another method, please advice.
Please give more details on second approach, seems interesting!
“Just navigate to the html file and let the browser do the work.” – please elaborate. Application.DownloadAndOpen(“_blank”, ms, $”catalog.html”); is opening a popu-up (new tab) in browser, serving the html as source. Opening pop-ups is tricky because of the browser asking for permision.
Activity
itg-assistant commentedon Jun 17, 2026
Julie (ITG) answered 2025-12-08 17:43:20 UTC
The HtmlPanel control in Wisej.NET is designed to display HTML content, but it doesn't create a full browser environment. Instead, it renders HTML within Wisej’s own widget framework. Because of this, CSS pseudo-classes like :hover still work correctly, since they are handled by the browser. However, anchor links such as do not behave as they normally would, because HtmlPanel does not create a standard browsing context with typical navigation. In addition, any JavaScript included in your HTML will not be executed.
If you want to display the HTML within your application while keeping the app active, use IFramePanel or WebBrowser control. These create a real iframe/browser context where CSS and anchor links work properly.
itg-assistant commentedon Jun 17, 2026
Adrian Zagar answered 2025-12-10 09:08:38 UTC
Hi Julie,
What I need is that: when specific conditions are met (in parameters, etc; doesn't concern the topic), I need one of the 2 posibilities:
Display the full html (with css, etc) in a webbrowser control. But I wasn't able to find HOW to execute something like
WebBrowser wb;
wb.html=myHtml; //that doesn't exist; what can I do?
Completely replace my application with myHtml. I tried:
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(html);
using (MemoryStream ms = new MemoryStream(bytes))
{
Application.DownloadAndOpen("_blank", ms, $"catalog.html");
}
Application.Navigate("javascript:window.close();");
That works, but the browser display a warning "allow pop-up" or "pop-up blocked" that prevent the opening of the new tab.
The first approach will be better, if you can tell me how to "inject" all html in WebBrowser.
itg-assistant commentedon Jun 17, 2026
Julie (ITG) answered 2025-12-10 15:16:41 UTC
You can do the first approach like this:
For the second approach, you can create an endpoint/handler that returns your HTML and navigate to it:
Application.Navigate("/api/catalog?id=123");
itg-assistant commentedon Jun 17, 2026
Adrian Zagar answered 2025-12-10 16:29:56 UTC
Thank you for answer. Unfortunatelly, myHTML is too big to use that method. If you khow another method, please advice.
Please give more details on second approach, seems interesting!
itg-assistant commentedon Jun 17, 2026
JD answered 2025-12-10 17:12:42 UTC
Just navigate to the html file and let the browser do the work.
itg-assistant commentedon Jun 17, 2026
JD answered 2025-12-10 17:14:37 UTC
In your sample you are using the wrong target.
itg-assistant commentedon Jun 17, 2026
Adrian Zagar answered 2025-12-10 17:18:00 UTC
“Just navigate to the html file and let the browser do the work.” – please elaborate. Application.DownloadAndOpen(“_blank”, ms, $”catalog.html”); is opening a popu-up (new tab) in browser, serving the html as source. Opening pop-ups is tricky because of the browser asking for permision.
itg-assistant commentedon Jun 17, 2026
Julie (ITG) answered 2025-12-15 15:34:16 UTC
Using Application.Navigate to access the html file is pretty simple.
Simply add the html file to your project, ie myhtml.html.
Then access it with Application.Navigate.
See attached test case.