Showing an HTML file in part of a Webform

  • Thread starter Tor Inge Rislaa
  • Start date
T

Tor Inge Rislaa

Showing an HTML file in part of a Webform

Hi I have a Webform with some buttons on the left side of the form. What I
want when clicking one of the buttons is to show an HTML document in a part
of the Webform (as if it was a Frame page). Any suggestions?

(I am an VB programmer)

T.I.Rislaa
 
M

Matt

What you could do is to use a table within an aspx page with 1 row, 2
columns. The first column would contain your buttons, and the second
one would contain a simple Label. When a button is clicked, you set
the text of the label with the html code you want.

In this example DynamicInclude is called when a button is clicked. The
parameter FileName is the name of the html file you want to display.
Note that this html file would not have header or body tags, since
these are already in your .aspx file.

LabelHTML would the label in the second column of the table in your
..aspx page. This kinda act like a frame. Hope this helps!


public string DynamicInclude(string FileName)
{
StreamReader FSO = new StreamReader(Server.MapPath(Filename));

LabelHTML.Text = FSO.ReadToEnd();

FSO.Close();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top