SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get Server control Value of User control in Container page???

    Hello All,

    In VS 2005 Web application,
    I am using master page (app.master) and a simple web page(test.apsx) where i drag a User control (ucontrol.ascx).
    Now in ucontrol.ascx page, I have an drop down.
    But when anyone choose drop down then i want to populate Datagrid in test.aspx according to that Drop down data so i wants to get drop down data of user control page from test.aspx.

    Is this possible .How to get it?
    Any idea?
    Thanks,
    Ujjwal
    -::Ujjwal::-
    Visit My Site

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    Page.FindControl("ctrlID") as DropDownList

  3. #3
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to get Drop down data of user control from test.aspx
    -::Ujjwal::-
    Visit My Site

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    ok, well ur Control should have an ID. Then in the control make a public getter that returns the ddlValue.

    then controlID.publicMethod();

  5. #5
    SitePoint Member kellogg9's Avatar
    Join Date
    Jun 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NightStalker-DNS View Post
    ok, well ur Control should have an ID. Then in the control make a public getter that returns the ddlValue.

    then controlID.publicMethod();
    you got it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •