0

Is it possible from c#/asp.net to call/show a separeted html-page in the same window.

I don't want to store the entire html code into a , for exemple... (that works).

Possible with javascript? or do I have to modify the code-behind?

The purpose is to load this html page everytime the default.aspx is invoked, as a webform(pop-up)

2 Answers 2

1

You can Use iframe to open your .html page as:

.aspx Page:

<iframe id="ifrm" runat="server"></iframe>

And on Page_Load(code behind):

protected void Page_Load(object sender, EventArgs e)
{ 
   ifrm.Attributes["src"] = "yourHtmlpageURL.html";
}
Sign up to request clarification or add additional context in comments.

3 Comments

Is possible show this frame on a condition? for exemple if I have a method that checks if cookie are on the browser-client or not?
Yes, it is possible.You can test your condition and show/hide iframe accordingly.
The iframe looks really bad and it will open a new frame with scroll bar. Is possible to use another method instead of iframe? I would like that looks like a pop up. If I put the entire code into the aspx inside a container looks perfect but I don't know how to handle it to show it only under a condition if cookie are set or not
0

You can use it asp.net

<iframe src="http://www.google.com"></iframe>

For c# application you can use WebBrowserControl.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.