Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. master page

master page

Scheduled Pinned Locked Moved ASP.NET
help
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ravikiranreddydharmannagari
    wrote on last edited by
    #1

    having text box and button in a master page..... issue is in child page.... when i clik on the (master) button iam not able to retain the value of (master) text box... plz help me out

    S M 2 Replies Last reply
    0
    • R ravikiranreddydharmannagari

      having text box and button in a master page..... issue is in child page.... when i clik on the (master) button iam not able to retain the value of (master) text box... plz help me out

      S Offline
      S Offline
      Sven Cipido
      wrote on last edited by
      #2

      Events (as for controls are handled locally. See more in this article : http://msdn2.microsoft.com/en-us/library/dct97kc3.aspx[^]. Bit it can be solved. All info can be found in this article : http://msdn2.microsoft.com/en-us/library/c8y19k6h.aspx[^]. Hopes this helps you out.

      Sven Cipido (http://blog.svencipido.be)

      1 Reply Last reply
      0
      • R ravikiranreddydharmannagari

        having text box and button in a master page..... issue is in child page.... when i clik on the (master) button iam not able to retain the value of (master) text box... plz help me out

        M Offline
        M Offline
        Michael Sync
        wrote on last edited by
        #3

        Suppose: You have one textbox called "TextBox1" in MasterPage. You wanna get the value of Textbox1 from child page.. So, use the following code. object txt = this.Master.FindControl("TextBox1"); Console.Write(txt.Text);

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        R 1 Reply Last reply
        0
        • M Michael Sync

          Suppose: You have one textbox called "TextBox1" in MasterPage. You wanna get the value of Textbox1 from child page.. So, use the following code. object txt = this.Master.FindControl("TextBox1"); Console.Write(txt.Text);

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

          R Offline
          R Offline
          ravikiranreddydharmannagari
          wrote on last edited by
          #4

          hi thank u for ur reply iam able to read the values but the issue is once i clk Master(button) iam not able to retain the values of textbox....

          M 1 Reply Last reply
          0
          • R ravikiranreddydharmannagari

            hi thank u for ur reply iam able to read the values but the issue is once i clk Master(button) iam not able to retain the values of textbox....

            M Offline
            M Offline
            Michael Sync
            wrote on last edited by
            #5

            humm.. You have one textbox called Textbox1 and Button1 in your Masterpage. what you wanna do is that you wanna get the value of textbox1 in the click event of button1. Is that what you want?? protected void Button1_Click(object sender, EventArgs e) { Console.WriteLine(TextBox1.Text); }

            Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

            R 1 Reply Last reply
            0
            • M Michael Sync

              humm.. You have one textbox called Textbox1 and Button1 in your Masterpage. what you wanna do is that you wanna get the value of textbox1 in the click event of button1. Is that what you want?? protected void Button1_Click(object sender, EventArgs e) { Console.WriteLine(TextBox1.Text); }

              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

              R Offline
              R Offline
              ravikiranreddydharmannagari
              wrote on last edited by
              #6

              on the postback iam not able maintain the state of (master)text box in child page..... In Master Page In child page if i enter "ravi" in textbox and clik on button iam not able to see the ravi in textbox.......... i hope its clear.....

              M 1 Reply Last reply
              0
              • R ravikiranreddydharmannagari

                on the postback iam not able maintain the state of (master)text box in child page..... In Master Page In child page if i enter "ravi" in textbox and clik on button iam not able to see the ravi in textbox.......... i hope its clear.....

                M Offline
                M Offline
                Michael Sync
                wrote on last edited by
                #7

                Master Page. ========== <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> Untitled Page

                ---------------------- Child Page ========== <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> Run the application. Put "ravi" in Textbox1. Click Button1. You will still see the "ravi" that you put.. Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                R 2 Replies Last reply
                0
                • M Michael Sync

                  Master Page. ========== <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> Untitled Page

                  ---------------------- Child Page ========== <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> Run the application. Put "ravi" in Textbox1. Click Button1. You will still see the "ravi" that you put.. Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                  R Offline
                  R Offline
                  ravikiranreddydharmannagari
                  wrote on last edited by
                  #8

                  hey iam using postback url for (master) button to redirect to another child page where i need to display the data.... In master page In Child Page.. string str = Request.Form["ctl00$Header1_txtword"].ToString(); once i clik on button the value in text box disapperaing.... -- modified at 3:24 Tuesday 10th July, 2007

                  S 1 Reply Last reply
                  0
                  • R ravikiranreddydharmannagari

                    hey iam using postback url for (master) button to redirect to another child page where i need to display the data.... In master page In Child Page.. string str = Request.Form["ctl00$Header1_txtword"].ToString(); once i clik on button the value in text box disapperaing.... -- modified at 3:24 Tuesday 10th July, 2007

                    S Offline
                    S Offline
                    sidbaruah
                    wrote on last edited by
                    #9

                    create a master page object and call the master page controls using this master page object!!!!

                    I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

                    1 Reply Last reply
                    0
                    • M Michael Sync

                      Master Page. ========== <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> Untitled Page

                      ---------------------- Child Page ========== <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> Run the application. Put "ravi" in Textbox1. Click Button1. You will still see the "ravi" that you put.. Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                      R Offline
                      R Offline
                      ravikiranreddydharmannagari
                      wrote on last edited by
                      #10

                      in master page in default.aspx if i clk on button i am not able to retain the value....

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups