AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 how to use diff pages inside one folder in C#.net
Posted by k n patel on  7/4/2013 6:47:51 PM Category: ADO.NET
Add to my favorites
Email to friend
when I create folder in web project and add 2 .aspx page inside that folder then how to give path or other web page name or if i want to go to 1st page to 2nd page then which page name i pass or how to write path for than i am using server.transfer method and page name.
is it require to pass folder name???

if I use simple 2nd webpage name then it will give error like: CS0246: The type or namespace name 'WebForm1' could not be found (are you missing a using directive or an assembly reference?

Post Your Reply Post New Question

 Viewer's Reply
Use Server.Transfer or Response.Redirect
Answered By Moderator1 on 6/24/2014 11:32:35 AM
Hi,

You can use either Server.Transfer or Response.Redirect. If the files are within same folder no need to specify the folder name. But when you are accessing the page from the root directly, you must specify the folder name.

Example: Response.Redirect("~/FolderName/PageName.aspx")
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Simply SQL - Free 111 Page Preview!
Integrating Silverlight 4 with SharePoint 2010 - Free 42 Page Sample Chapter
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview