p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 4th, 2005, 07:02 AM
Friend of Wrox
Points: 340, Level: 6
Points: 340, Level: 6 Points: 340, Level: 6 Points: 340, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Preston, Lancashire, United Kingdom.
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default Using form id to detect a page

Hi all,

I have a user control that is for all the pages in a folder that has a bit of text, a menu and an image. Now what I want to acheive if for it to detect what page it is on ie: default.aspx and then if it is then i dont want it to display the menu.... how would i set about this and would it involve using the form id tag?

I tried writing an if statement something to the effect of...

If Form Name = "Default" then

       repDefaultMenu.Visible = False

End If


Clearly that is not going to work though. How do I obtain the form ID or form name. On the form its called form id but when outputted to html its form name.

thanks.

David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
__________________
David Jenkins
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #2 (permalink)  
Old October 4th, 2005, 07:41 AM
Friend of Wrox
Points: 1,903, Level: 17
Points: 1,903, Level: 17 Points: 1,903, Level: 17 Points: 1,903, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: , , India.
Posts: 547
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi David

Just copy and paste the line below on one of your pages, and check the result, you will get the page name:

Response.Write(Request.Url.ToString().Substring(Re quest.Url.ToString().LastIndexOf("/")+1));

Regards
Mike

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #3 (permalink)  
Old October 4th, 2005, 03:28 PM
Friend of Wrox
Points: 340, Level: 6
Points: 340, Level: 6 Points: 340, Level: 6 Points: 340, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Preston, Lancashire, United Kingdom.
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default

Cheers Mike that works perfectly and i can work with that nicely, thanks again.



David Jenkins
-------------------------------------------------------------
Do you want to make extra money around your commitments?
Credit cards, bills, loans and a mortgage - all getting you down?
Is your pension going to be enough when you retire?
There is a solution visit http://www.1stmillion.co.uk
or call 01772 489521
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
 


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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I detect a page-break in a subreport? SiliconDragon Crystal Reports 1 December 6th, 2006 04:55 AM
Detect Web Form Field Changes in ASP.NET. sand133 ASP.NET 2.0 Professional 1 August 22nd, 2006 11:15 AM
Passing the Id to another form louie001 ASP.NET 1.0 and 1.1 Basics 1 July 14th, 2006 07:45 AM
detect mouse click off form vb certified Beginning VB 6 6 July 7th, 2005 08:55 PM
to retreive form values on basis of an id kashsheikh ASP Forms 5 December 1st, 2004 11:32 AM



All times are GMT -4. The time now is 11:47 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc