I am loading a user control dynamically like below
UserControl objUserControl = (UserControl)this.LoadControl("~/UserControls/ucProfileViewDefault.ascx");
Now I have another user control file ucProfileViewSMSIS.ascx which is located in some other location . I need to copy this file to my virtual path at run time and then load it like below
UserControl objUserControl = (UserControl)this.LoadControl("~/UserControls/ucProfileViewSMSIS.ascx");
How do i do this ?
Server.MapPathandPage.ResloveUrlwill get you the location, then you can move it and load: