converting aspx pages as content pages with user control

hi,

i am converting the applicaiton 1.1 to asp 2.0. just wanted to know if there are known issue when converting the aspx to content pages where aspx have multiple user control.

Like what are the usual issues i could get into?

 

thnaks 


learning.. : )
0
aammiz
6/10/2008 4:58:43 AM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

4 Replies
591 Views

Similar Articles

[PageSpeed] 47

Hi,

About how to convert the aspx pages into the content pages, you can refer this thread: http://forums.asp.net/t/1244510.aspx

About the usercontrol that is on the cotent page, you can need to drag the usercontent into the cotent page, or you also can Register the usercontrol manualy, for example:

<%@ Page Language="C#" MasterPageFile="~/TestUserControl/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="TestUserControl_Default" Title="Untitled Page" %>
<%@ Register src="UserControls/Menu.ascx" tagname="Menu" tagprefix="uc1" %>
<%@ Register src="UserControls/UC1l.ascx" tagname="UC1l" tagprefix="uc2" %> 

Hope it helps.


Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Amanda
6/11/2008 4:32:55 AM

so if i have a home.aspx pages which has 6 user control and now I want to use the master pages. After removing the header, form, body tage and adding the page directive which is referencing to the master page. it will be ready to be use as a content page.  Now to deal with the user controls , the one thing i can do is drag the user content in the content page and drop them there. Is it right.?  And the other way is to just register the user control in the content page. 

So if i already have a aspx page and it has user controls , so it should be register at the aspx page.  Would I still have to do something?.

Thanks. 

 

 

 


learning.. : )
0
aammiz
6/12/2008 4:32:07 AM

Hi,

aammiz:
So if i already have a aspx page and it has user controls , so it should be register at the aspx page.  Would I still have to do something?.

If the content page has the user control, it should be like this:

<%@ Page Language="C#" MasterPageFile="~/TestUserControl/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="TestUserControl_masterpage_Default" Title="Untitled Page" %>
<%@ MasterType VirtualPath="~/TestUserControl/masterpage/MasterPage.master"  %>
<%@ Register src="../UserControls/UC1l.ascx" tagname="UC1l" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <uc1:UC1l ID="UC1l1" runat="server" />
</asp:Content>

Hope it helps.


Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Amanda
6/12/2008 7:55:29 AM

Thanks Amanda, it is very usefull information i gathered, the sites you suggested are very helpful. Thanks.;) 


learning.. : )
0
aammiz
6/13/2008 3:31:11 AM
Reply: