Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 30th, 2005, 03:04 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to check the page contain parameters or not?

Dear Everybody,

I got stucked with my code using ASP.NET 1.1 with C# and MS SQL 2000.
My problem is I wish to make my page as like this website "http://www.telerik.com/Default.aspx" this page is serve as a main home page of Telerik and if you click on Products it will display another link like "http://www.telerik.com/Default.aspx?PageId=1321", so you can see that Telerik's site using only one page to serve all the pages(Default.aspx).

So if anyone know how to it, please share me.

Thank you in advanced,
HUYFAMILY
 
Old August 1st, 2005, 01:17 AM
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,

I did this once. I don't know whether it is the efficient way or not. You make a table in the database with a column for the id and a column for code. The id column will hold the pages ids like in the example you gave (PageId=1321) and the code column will hold the code of that page whether it is asp, php, html. You can make the Default.aspx page with static style that will apply for each page and according to the PageId in the link you bring the code from the database and put it inside your Default.aspx.

 
Old August 2nd, 2005, 05:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Dim strPageId As String = Request.QueryString("PageId")
If strPageId Is Nothing
   'show default stuff
Else
   'show page id stuff
End If

string strPageId = Request.QueryString["PageId"];
if(strPageId == null){
   //show default stuff
} else {
   //show page id stuff
}


-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check the parameters passed to web method? karveajit ASP.NET 1.0 and 1.1 Professional 3 December 20th, 2006 05:55 PM
Adding Parameters to a Page. akhilhp ASP.NET 2.0 Basics 2 November 20th, 2006 12:31 AM
Passing parameters to a new page... gbianchi ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2006 03:02 PM
how to check if page is already loaded? phpworker Javascript How-To 0 July 31st, 2005 11:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.