Results 1 to 2 of 2

Thread: Asp.net question

  1. #1
    WalkerCook is offline Senior Member
    Join Date
    Dec 2009
    Posts
    253
    Rep Power
    3

    Default Asp.net question

    I have one query in my asp.net project. I have two user controls, first user control have textbox and a button though second user control contain label. When we click on button of first custom control button the value of the textbox will get updated into Label of second custom control. If you have any code then let me know that.

  2. #2
    PerezMorris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    250
    Rep Power
    3

    Default

    The code that I have mentioned will definitely help you.

    Code:
    ControlA ctrlA =
    (ControlA)Page.FindControl("<usercontrolname>");
    TextBox textBoxA=(TextBox)ctrlA.FindControl("<Textbox name>");
    
    ControlB ctrlB =
    (ControlB)Page.FindControl("<usercontrolname>");
    Label labelB=(Label )ctrlB.FindControl("<Textbox name>");
    Label.Text=TextBox.Text;
    **)
    First of all i would like to thank you all for giving me this valuable suggestion. These suggestions have worked for me.

Similar Threads

  1. Question about new CPU
    By Benedict Patrician in forum CPU & Components
    Replies: 5
    Last Post: 10-16-2010, 12:28 PM
  2. Windows' RAM question.
    By Basilio Camillo in forum Windows Vista
    Replies: 4
    Last Post: 09-04-2009, 06:00 AM
  3. Question
    By hardwareguru in forum Everything Else
    Replies: 1
    Last Post: 05-02-2009, 09:53 AM
  4. DHCP question
    By venkatesh in forum General Networking
    Replies: 0
    Last Post: 02-26-2009, 11:47 AM
  5. My Question about
    By DYNCENRON in forum Graphic & Displays
    Replies: 0
    Last Post: 10-05-2008, 08:38 PM

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
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48