Hi all,
I have a masterpage and contentPlaceHolder in it. I used <asp:content .. in Default aspx. I have web user controls.
By sending parameter to Default.aspx, can I call different web user controls in Default aspx.
I try to that because of not making a page same with Default.aspx for every web user control.
I have an idea about that, but is that possible ?? :
in default.aspx :
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="HomePage" Async="true"%>
<%@ Register TagPrefix="pnl" TagName="SmartPanelButton" Src="~/SectionControls/Panel/PanelControl.ascx" %>
<%@ Register TagPrefix="lgn" TagName="LoginControl" Src="~/SectionControls/Login/LoginControl.ascx" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
<div id="divMainContent" >
<lgn:LoginControl ID="LoginControl" runat="server" />
</div>
</asp:Content>
Can I change type(lgn:LoginControl) of "LoginControl" codebehind while page initiliaze? IF it is possible, I can register the page to this web user control depending on parameters come from previous page and load it.
I mean : (codebehind)
if(parameter = 1) register page with TagPrefix="usr" TagName="ProfilControl" Src="~/SectionControls/Profil/Profil.ascx"
else if(parameter==2) register page with TagPrefix ....
is there a way for that ??
thanks for all helps and ideas.
Deniz