How to manipulate Masterpage's Controls?

Rate It (1)

Last post 01-28-2008 11:33 PM by mbanavige. 1 replies.

Sort Posts:

  • How to manipulate Masterpage's Controls?

    01-28-2008, 11:19 PM
    • Member
      104 point Member
    • Jabalang
    • Member since 12-12-2007, 11:28 AM
    • Antarctica
    • Posts 124

    Hi, All

    How do i manipulate masterpages's controls like Textbox.Text value from its contentplaceholder page?

    Can anyone tell me what is the code for editing the Masterpages controls from its contentplaceholder page?

    I wanted to change the text value of Textbox1 which is belong to the masterpages. How do i do that from its contentplaceholder page?

    thx pple.

    Regards,
    Jabalang
    --------------------------------------------------
    Thanks for building the Internet as a Library.
    Thanks for sharing and being helpful.
  • Re: How to manipulate Masterpage's Controls?

    01-28-2008, 11:33 PM
    Answer
    • All-Star
      97,058 point All-Star
    • mbanavige
    • Member since 11-06-2003, 8:29 AM
    • New England, USA
    • Posts 10,261
    • Moderator
      TrustedFriends-MVPs

    like this:

    Directcast(Me.Master.FindControl("TextBox1"), TextBox).Text = "Some new text"
     
    Mike Banavige
    ~~~~~~~~~~~~
    Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
Page 1 of 1 (2 items)