C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




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


Posted Date: 04 Sep 2008      Total Responses: 1

Posted By: gandhi       Member Level: Silver     Points: 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: varun    05 Sep 2008Member Level: GoldRating:     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



Post Reply
You must Sign In to post a response.
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   BizTalk Adaptors    Web Design

accuconference

Contact Us    Privacy Policy    Terms Of Use