Webmaster Forum

Advertise Here   Keyword Research Tool   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 10-06-2007, 11:21 AM   #1 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
Creating content pages on the fly?

Does anyone know if it's possible to create content page for an ASP masterpage on the fly? Basically i have records being loaded into a news column via an ASP DataList control and i've made the title of the news become a link automatically, by makin the newly inserted record's ID be parsed with the words 'news.aspx', this is then a genuine link to a page. So the new news item is automatically linked on the fly but this link needs to be fulfilled, i.e. with a contet page for the master with URL, '[ID] + "news.aspx"' and then whatever text for the news was inserted with the record can be put into a <div></div> using the Controls.Add('') etc.

But i can't figure out how to get it to create one one the fly, and nowhere can i find a reference to 'webforms', 'contentpage' etc etc.

I can post code but it doesn't really make a diff, i just put the reason behind needing to create a page on the fly just to give a clear picture... i've probably confused peeps though!

Thanks guys/gals,

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 10-06-2007, 10:35 PM   #2 (permalink)
v7n Mentor
 
digiweb's Avatar
 
Join Date: 04-07-06
Location: Manchester, NH
Posts: 762
iTrader: 1 / 100%
digiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of light
Send a message via Yahoo to digiweb Send a message via Skype™ to digiweb
I think you don't want to do that. I think you want to create a content page and populate a control on that page on the fly.
digiweb is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-08-2007, 12:33 AM   #3 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
i will have to settle with that way as i've still not any idea on how to do it...
This means have all the pages there ready but only populated and set live whenever someone adds a new record into the database...

Cheers Corline

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-08-2007, 07:14 AM   #4 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania (atm)
Posts: 2,846
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
You mean something like this:

Quote:
Let's say you have two pages:
  1. Default.aspx
  2. AddUser.aspx

The Default.aspx page will be used display all the users from the database and the AddUser.aspx will be used to insert a user in the database.

The Default.aspx contains a DataGridView to display the users. In the code behind you bind the DataGridView to the Users datatable from a dataset.
In the Page_Load you populate the DataGridView with data.

Now, everytime you view the Default.aspx page you'll have the DataGridView control showing the existent users in the datatable.
??
__________________
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-08-2007, 07:34 AM   #5 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
my explanation has eluded people again... i need to learn my own language more!

I'll try to explain more clearly. I have a table that contains all data for a news column. The news column is loaded into the masterpage via an <asp: DataList> control. So the displayed data is fine. It comes up fine and the title of the news is dynamically made a hyperlink to it's corresponding news page, i.e. <a href="<%= eval newsLink %>".

So i've then made a NewsEditor page so that new news stories can be added by simply typing in the title, selecting the date and typing in the content. THis is all inserted into the table then via SQL statement. What i've done though is also included a column in the table which is populated on insert, like so

"news" + '[NewsID]' + ".aspx"

therefore each new news story has a proper link, i.e. news4.aspx. And this is what's the anchor for link to the corresponding news page.

So basically i was wandering if that when the Insert was done and the news link has been created i could create a new content page for my masterpage with the name 'news4.aspx' on the fly? If so i could then have all the work done for me by simply filling the news content into the page from the database and then maintenance is less on the site. The page will look good because of it's master, all that needs to be done is to fill the content holder with the news content.

So in a nutshell, can you create a content page on the fly?

Costin, is that a better explanation?
I have a feelling the answer is with you Costin!

Thanks,

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-08-2007, 07:45 AM   #6 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania (atm)
Posts: 2,846
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
I personally never tried that before, but I'll try to find an answer for you.

hypotethicaly, it should be possible, but I don't want to speculate here before I have a proper answer.
__________________
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-08-2007, 07:51 AM   #7 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania (atm)
Posts: 2,846
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
Quote:
So in a nutshell, can you create a content page on the fly?
The answer is: yes

>> http://www.velocityreviews.com/forum...aspx-form.html
__________________
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
linking to pages with same content ? sim64 Google Forum 6 07-10-2007 01:31 AM
Ad-network for non-content pages thing2b Webmaster Revenue 4 11-16-2006 06:42 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 10:09 PM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.