Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 3rd, 2006, 03:12 AM
Authorized User
 
Join Date: Aug 2005
Location: , , Finland.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.net many pages on one page?

How can I do that it would look on my page that all pages would be on same page.

EX. Login page would see on address bar ..../default.aspx?page=login
    Main page would see on address bar ..../default.aspx?page=main
    pictures page would see on address bar .../default.aspx?page=gallery
All pages have same layout.

pls Help

  #2 (permalink)  
Old February 3rd, 2006, 07:23 AM
Registered User
 
Join Date: Dec 2005
Location: Hyderabad, Andhra Pradesh, India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to munnu Send a message via Yahoo to munnu
Default

Hi Lofa,

Use of Panels will give u the required output.
example.. You design the LoginPage in one panel say panel1, MainPage in another panel say panel2, and Picture page in another panel say panel3.

In ur code behind page... try like this..
        If Request.QueryString("Page") = "login" Then
            panel1.visible = True
            panel2.visible = False
            panel3.visible = False
        ElseIf Request.QueryString("Page") = "main" Then
            panel1.visible = False
            panel2.visible = True
            panel3.visible = False
        ElseIf Request.QueryString("Page") = "gallery" Then
            panel1.visible = False
            panel2.visible = False
            panel3.visible = True
        End If

I think this way u can avoid the number of pages.

Mail me back if this doesn't help u.

regards,
Munavvar

  #3 (permalink)  
Old February 3rd, 2006, 12:51 PM
Authorized User
 
Join Date: Aug 2005
Location: , , Finland.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That would be much coding if I have like 10 pages. Is there not a easyer solution?
I use a SQL Database where I have a menu structure that loads on the pages.

  #4 (permalink)  
Old February 10th, 2006, 07:42 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you want to use ASP.NET 2.0 you can use masterpages.

Or for ASP.NET 1.1:
http://www.geekdork.com/WebSkeleton/

-Peter
  #5 (permalink)  
Old February 12th, 2006, 12:51 PM
Authorized User
 
Join Date: Aug 2005
Location: , , Finland.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did get this script from a another forum

I .aspx.vb file write this
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs)

       Dim strload As String

        If Request.QueryString("Page") = "" Then
            strload = "/home.net/home.ascx"
        Else
            strload = "/home.net/" & Request.QueryString("Page") & ".ascx"
        End If

        Dim ctrl1 As Control = CType(Page.LoadControl(strload), Control)
        PH1.Controls.Add(ctrl1)

    End Sub
and then in the aspx file where you want the page load this:
<asp:placeholder ID="PH1" runat="server"></asp:placeholder>

Then You can have pages in .ascx and you don't need html tags in ascx


  #6 (permalink)  
Old February 13th, 2006, 12:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

When you do that, do you get the state management to work in the same way? Also, don't you have to load it on every page load?


Brian
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading HTML pages into an ASP.NET page Dsypher ASP.NET 2.0 Basics 4 May 17th, 2007 07:21 AM
opening asp.net pages naidukap ASP.NET 1.0 and 1.1 Basics 0 October 17th, 2005 11:48 PM
How windows NET authentication done in ASP pages lakshmy_raj Classic ASP Basics 1 October 20th, 2004 02:28 AM
Varibles between asp.net and Asp Pages koneruvijay VS.NET 2002/2003 1 February 23rd, 2004 04:32 AM
Shall i use ASP page and ASPX pages in in .net prj bvrao VS.NET 2002/2003 4 January 5th, 2004 04:39 AM



All times are GMT -4. The time now is 12:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.