Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a user control ProfileSetup.ascx with property
C#
[DefaultValue("")]
        public virtual string Name{ get; set; }


The user control is shown in HomePage.aspx as a modal popup

XML
<als:Panel ID="pnlProfilePopup" Style="display: none;" Width="100%" runat="server">
            <cgf:CustomProfile ID="ccProfileSetup" runat="server" />
        </als:Panel>



In HomePage.aspx there a "Profile" button

on click of "Profile" button I set the property of user control
C#
ccProfileSetup.Name = "ABC";
myModalPopup.show();



but when the popup opens the Name property is null or ""

Please provide a solution. when i do it from aspx it works

C#
<als:Panel ID="pnlProfilePopup" Style="display: none;" Width="100%"  runat="server">
            <cgf:CustomProfile ID="ccProfileSetup"  runat="server" Name="ABC" />
        </als:Panel>


can it be done from code behind event?
Posted

1 solution

try this..


C#
 myModalPopup.show();
ccProfileSetup.Name = "ABC";


call the show() method first and then asign the property value..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900