.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

User Cannot go directly to a specific page

Posted By: Anup     Posted Date: December 10, 2009    Points:2   Category :ASP.Net
Hi,

I have 3 pages(Page1, Page2, Page3) in my Application,

Now the problem is that I don't want the User to go directly to Page 2 or Page 3. User should be redirected to Page 1, if they do so.

How this can be achieved?


"There has to be evil so that good can prove its purity above it."
- Gautam Buddha

Thanx
- Anup

Responses
Author: Venkat             
Posted Date: December 10, 2009     Points: 5   

Hi,

You can achieve your requirement using Javascript Just paste this code inside the page 2 and 3

<script language='Javascript'>

if(history.length <= 0)
{
window.location.href = "Page1.aspx";
}
</script>


Venkat

Mark As Answer if this solve your problem
Warm Regards,
Venkat
Author: Lincy Lucy             
Posted Date: December 10, 2009     Points: 5   

You can use Server.Transfer for this

http://acter-actress.blogspot.com/

With regards
Lincy Lucy
Exclusive offers & Discount on each order.Come and visit the beauty of God's Own Country


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend