Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$^&* Layout Question

Status
Not open for further replies.

JurkMonkey

Programmer
Nov 23, 2004
1,731
CA
Hi,

I am very familiar with C# but not with asp.net

I simply want to have my webpage -> and insert a separate page in part of a table on my page. The page to be loaded should be pulled from the url.

example:
should do this:

<html>
<head />
<body>

<table>
<tr>
<td> display the 2012.html content here </td>
</tr>
</table>

</body>
</html>


Thanks in advance.
 
You can't do all that just in html. There are several ways to do this, client-side or server-side.

The easiest way (but probably not the best) is to have an <iframe> in your table. You can display output from other pages in an iframe.

To get the url to your article, you can use javascript. Create a javascript function that will get "article=2012.html" from your url. You can use js functions to get this(QueryString). Once your url is built, point your iframe to your article page.

 
I'd rather not use an iframe -> I want to include the code directly. Thanks for the input though. How do I get a little more complex than that?
 
Hi,

I do this but I put all the html into the database.
If it's an article page with just text and maybe a few images then this works well and you don't end up with thousands of html files.

Then I have a user control inside the main page called (eg) content.ascx

In content.ascx is a label that simply draws the html from the database based on the unique ID of that record.

So the querystring might look something like

default.aspx?page=content@id=2012

j

----------------------------------------------------------------------------------------
A community development project in asp.net -
 
Cool.

In Perl, I always use the includes. It seems to work quite well but it seems in asp, the includes are rendered before you can pull the variables from the url.

Thanks for your input
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top