Click here to Skip to main content
15,891,136 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to persist the focus on the panel during postback Pin
Christian Graus28-Jun-09 23:49
protectorChristian Graus28-Jun-09 23:49 
QuestionHow to deal with Fileupload control inside View control ? Pin
Rameez Raja28-Jun-09 23:42
Rameez Raja28-Jun-09 23:42 
AnswerRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus28-Jun-09 23:50
protectorChristian Graus28-Jun-09 23:50 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Rameez Raja29-Jun-09 0:34
Rameez Raja29-Jun-09 0:34 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus29-Jun-09 0:40
protectorChristian Graus29-Jun-09 0:40 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Rameez Raja29-Jun-09 1:14
Rameez Raja29-Jun-09 1:14 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus29-Jun-09 10:28
protectorChristian Graus29-Jun-09 10:28 
QuestionLaunching as aspx page from a user control(ascx) with parameters Pin
tiran_kaskas28-Jun-09 22:27
tiran_kaskas28-Jun-09 22:27 
Dear colleges,
I have the following case:

1. web_page.aspx, using UC1.ascx
2. When this page is launched, after user does some things (selects settings), I need to launch web_page2.aspx from UC1.ascx with some parameters.
3. web_page2.aspx uses another user control (UC2.ascx), which needs the parameters passed from step 2 (from UC1.ascx).

Bottom line:
1. I need to pass parameters from UC1.ascx to web_page2.aspx.
2. The I need to pass these parameters from web_page2.aspx to UC2.ascx

I tried the following, which I know will not serve my needs:

In my UC1.ascx:
                <br />
object[] constructorParameters = new object[1];<br />
<br />
                constructorParameters.SetValue(SocketUserSettings, 0);<br />
<br />
                List<Type> constParamTypes = new List<Type>();<br />
                foreach (object constParam in constructorParameters)<br />
                {<br />
                    constParamTypes.Add(constParam.GetType());<br />
                }<br />
<br />
                UserControl ctl = Page.LoadControl("UC2.ascx") as UserControl;<br />
                // Find the relevant constructor<br />
                System.Reflection.ConstructorInfo constructor = ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());<br />
<br />
                //And then call the relevant constructor<br />
                if (constructor == null)<br />
                {<br />
                    throw new MemberAccessException("The requested constructor was not found on : " + ctl.GetType().BaseType.ToString());<br />
                }<br />
                else<br />
                {<br />
                    constructor.Invoke(ctl, constructorParameters);<br />
                }<br />


And inside UC2.ascx constructor I did:
<br />
public SocketConnectionList(SocketParam SocketUserSettings)<br />
        {<br />
            m_propertiesSet = true;<br />
            m_SocketUserSettings = SocketUserSettings;<br />
            Response.Redirect("SocketConnectionListPage.aspx");<br />
        }<br />



The problem with this code is that launching an aspx from a user control will cause launching another instance of user control for the page launch and hence the parameters passed are not accessible for the second instance.


Please you help is appreciated.
AnswerRe: Launching as aspx page from a user control(ascx) with parameters Pin
Manas Bhardwaj28-Jun-09 22:58
professionalManas Bhardwaj28-Jun-09 22:58 
GeneralRe: Launching as aspx page from a user control(ascx) with parameters Pin
tiran_kaskas28-Jun-09 23:13
tiran_kaskas28-Jun-09 23:13 
GeneralRe: Launching as aspx page from a user control(ascx) with parameters Pin
Manas Bhardwaj28-Jun-09 23:21
professionalManas Bhardwaj28-Jun-09 23:21 
QuestionWeb Control Library Pin
devvvy28-Jun-09 21:49
devvvy28-Jun-09 21:49 
Questionhow to make an effective invitation number in activation emails Pin
netsooz (Amir Hamidi)28-Jun-09 21:47
netsooz (Amir Hamidi)28-Jun-09 21:47 
AnswerRe: how to make an effective invitation number in activation emails Pin
Christian Graus28-Jun-09 22:02
protectorChristian Graus28-Jun-09 22:02 
AnswerRe: how to make an effective invitation number in activation emails Pin
N a v a n e e t h28-Jun-09 22:06
N a v a n e e t h28-Jun-09 22:06 
Questionany example on webparts and personalisation of webparts using db as oracle Pin
lakshmichawala28-Jun-09 21:21
lakshmichawala28-Jun-09 21:21 
AnswerRe: any example on webparts and personalisation of webparts using db as oracle Pin
Ravi Mori28-Jun-09 23:23
Ravi Mori28-Jun-09 23:23 
QuestionAjax Pin
senthilsstil28-Jun-09 21:10
senthilsstil28-Jun-09 21:10 
AnswerRe: Ajax Pin
Christian Graus28-Jun-09 21:16
protectorChristian Graus28-Jun-09 21:16 
QuestionRegrading Excel Generation. Pin
harish mehra28-Jun-09 20:10
harish mehra28-Jun-09 20:10 
AnswerRe: Regrading Excel Generation. Pin
N a v a n e e t h28-Jun-09 20:22
N a v a n e e t h28-Jun-09 20:22 
AnswerRe: Regrading Excel Generation. Pin
Christian Graus28-Jun-09 20:29
protectorChristian Graus28-Jun-09 20:29 
AnswerRe: Regrading Excel Generation. Pin
Niladri_Biswas30-Jun-09 3:39
Niladri_Biswas30-Jun-09 3:39 
GeneralRe: Regrading Excel Generation. Pin
harish mehra2-Jul-09 21:22
harish mehra2-Jul-09 21:22 
Questionstop data saved twice when page is refreshed Pin
nitin_ion27-Jun-09 22:17
nitin_ion27-Jun-09 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.