Referencing to .ascx

Discussion in 'ASP .Net Web Controls' started by Tomas Kepic, Apr 24, 2005.

  1. Tomas Kepic

    Tomas Kepic Guest

    Hi all,

    in my application I create a USER CONTROL with name "test.ascx" with one
    textbox named "User" and one button "Submit".

    In my default page "default.aspx" I add this user contorol to page with using:

    Control AAA = LoadControl("test.ascx");
    FirstTest.Controls.Add(AAA);

    and referencing <%@ Reference Control = "test.ascx" %> in html page. I also
    use ASP:pLACEHOLDER for FirstTest Control.

    My problem is that I don't know how can I reference in my "default.aspx"
    page to value stored in User textbox in "test.ascx".

    So I can't use value stored in textbox User in other parts of my projects. I
    can't see it!

    Please help me someone, I'm beginner in ASP and I can't continue. Please
    help me.



    I have this problem and I can't solve this for o
    --
    Tomas
    Tomas Kepic, Apr 24, 2005
    #1
    1. Advertising

  2. Tomas Kepic

    Galin Iliev Guest

    Try just dragging USERControl from Solution explorer into your webpage
    directly
    thus you will see where it is placed.
    set properly name to usercontrol
    then declare control in page code class and you are ready

    if you have troubles with this write me, pls

    Regards
    Galin Iliev

    "Tomas Kepic" <> wrote in message
    news:...
    > Hi all,
    >
    > in my application I create a USER CONTROL with name "test.ascx" with one
    > textbox named "User" and one button "Submit".
    >
    > In my default page "default.aspx" I add this user contorol to page with
    > using:
    >
    > Control AAA = LoadControl("test.ascx");
    > FirstTest.Controls.Add(AAA);
    >
    > and referencing <%@ Reference Control = "test.ascx" %> in html page. I
    > also
    > use ASP:pLACEHOLDER for FirstTest Control.
    >
    > My problem is that I don't know how can I reference in my "default.aspx"
    > page to value stored in User textbox in "test.ascx".
    >
    > So I can't use value stored in textbox User in other parts of my projects.
    > I
    > can't see it!
    >
    > Please help me someone, I'm beginner in ASP and I can't continue. Please
    > help me.
    >
    >
    >
    > I have this problem and I can't solve this for o
    > --
    > Tomas
    Galin Iliev, Apr 25, 2005
    #2
    1. Advertising

  3. Tomas Kepic

    Tomas Kepic Guest

    Hi Galin,

    I dragged My UserControl from Solution explorer into my webpage, as you
    wrote, but I don't know how to set property name to usercontrol. Can you
    write me some example? This property should I write in HTML view
    (default.aspx) or in "codebehind" default.aspx.cs.

    Thanx for your time, and sorry that I'm asking you with this boring
    questions, but I'm just beginner in ASP.NET.

    Tomas

    "Galin Iliev" wrote:

    > Try just dragging USERControl from Solution explorer into your webpage
    > directly
    > thus you will see where it is placed.
    > set properly name to usercontrol
    > then declare control in page code class and you are ready
    >
    > if you have troubles with this write me, pls
    >
    > Regards
    > Galin Iliev
    >
    > "Tomas Kepic" <> wrote in message
    > news:...
    > > Hi all,
    > >
    > > in my application I create a USER CONTROL with name "test.ascx" with one
    > > textbox named "User" and one button "Submit".
    > >
    > > In my default page "default.aspx" I add this user contorol to page with
    > > using:
    > >
    > > Control AAA = LoadControl("test.ascx");
    > > FirstTest.Controls.Add(AAA);
    > >
    > > and referencing <%@ Reference Control = "test.ascx" %> in html page. I
    > > also
    > > use ASP:pLACEHOLDER for FirstTest Control.
    > >
    > > My problem is that I don't know how can I reference in my "default.aspx"
    > > page to value stored in User textbox in "test.ascx".
    > >
    > > So I can't use value stored in textbox User in other parts of my projects.
    > > I
    > > can't see it!
    > >
    > > Please help me someone, I'm beginner in ASP and I can't continue. Please
    > > help me.
    > >
    > >
    > >
    > > I have this problem and I can't solve this for o
    > > --
    > > Tomas

    >
    >
    >
    Tomas Kepic, Apr 25, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Quentin
    Replies:
    1
    Views:
    483
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    482
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,937
    Holger (David) Wagner
    Jul 3, 2004
  4. Joe
    Replies:
    1
    Views:
    372
    Jeffrey Tan[MSFT]
    Feb 16, 2004
  5. Replies:
    2
    Views:
    532
Loading...

Share This Page