C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

how to solve 'This type of page is not served' ?


Posted Date: 04 Sep 2008      Posted By: gandhi      Member Level: Silver     Points: 1   Responses: 1



Dear all

in my project i create default.aspx, calculation.aspx and detail.ascx page.

default.aspx.vb coding i used response.redirect(calculation.aspx) its working fine no problem.

calculation.aspx.vb coding i used response.redirect(detail.ascx)that time i got "This type of page is not served"

how to solve this problem? what is my mistake?





Responses

Author: Puja Sharma    05 Sep 2008Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

Hi gandhi,

detail.ascx is a user control page and IIS does not render user control page directly to the browser.
You have to use that user control page in a aspx page.
User control page starts with header like this:


//C#
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyControl.ascx.cs" Inherits="MyControl" %>



Create a new aspx page and add the following line at the top of the page after the @Page declaration:


<%@ Register Src="MyControl.ascx" TagName="MyControl" TagPrefix="uc1" %>


where src=name of your ascx page
TagName and Tagprefix you will use to add that control to your aspx page.

For example, in your aspx page, you will add the user control like this:


<uc1:MyControl id="id1" runat="server" />


Feel free to contact me if you face any problem...

varun

Varun Sharma
Visit my Flixya Profile



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Compilation error: An error occurred during the compilation of a resource required to serv
Previous : what is web test and unit test?
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use