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. How can i check textbox null inside masterpage

How can i check textbox null inside masterpage

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netquestion
5 Posts 2 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.
  • D Offline
    D Offline
    deepthy p m 0
    wrote on last edited by
    #1

    I am using asp.net with c#.In my project i am using master page .Each form are child of this master page.I want to check textbox null in clild master page using javascript. I use the following code to check null. butSubmit.Attributes.Add("OnClick", "return val()"); function val() { if(document.getElementById("TextBox1").value=="") { return; } } but its not working.If, without using the master page it work properly.In my child master page there is no form tag.Because in my master page i use teeview so form tag is placed in master page.If anyone understand my probelm pls .

    S 1 Reply Last reply
    0
    • D deepthy p m 0

      I am using asp.net with c#.In my project i am using master page .Each form are child of this master page.I want to check textbox null in clild master page using javascript. I use the following code to check null. butSubmit.Attributes.Add("OnClick", "return val()"); function val() { if(document.getElementById("TextBox1").value=="") { return; } } but its not working.If, without using the master page it work properly.In my child master page there is no form tag.Because in my master page i use teeview so form tag is placed in master page.If anyone understand my probelm pls .

      S Offline
      S Offline
      Sherin Iranimose
      wrote on last edited by
      #2

      Where the text box is? In Master page or content page(child page)?

      deepthy.p.m wrote:

      I want to check textbox null in clild master page using javascript.

      How many master pages are there?

      EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

      D 1 Reply Last reply
      0
      • S Sherin Iranimose

        Where the text box is? In Master page or content page(child page)?

        deepthy.p.m wrote:

        I want to check textbox null in clild master page using javascript.

        How many master pages are there?

        EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

        D Offline
        D Offline
        deepthy p m 0
        wrote on last edited by
        #3

        content page

        S 1 Reply Last reply
        0
        • D deepthy p m 0

          content page

          S Offline
          S Offline
          Sherin Iranimose
          wrote on last edited by
          #4

          JS Function function val(cntrl) { if(document.getElementById(cntrl).value=="") { return false; } }

          deepthy.p.m wrote:

          butSubmit.Attributes.Add("OnClick", "return val()");

          btnsubmit.Attributes.Add("onclick", "return val('" + TextBox1.ClientID + "')")

          EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

          D 1 Reply Last reply
          0
          • S Sherin Iranimose

            JS Function function val(cntrl) { if(document.getElementById(cntrl).value=="") { return false; } }

            deepthy.p.m wrote:

            butSubmit.Attributes.Add("OnClick", "return val()");

            btnsubmit.Attributes.Add("onclick", "return val('" + TextBox1.ClientID + "')")

            EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.

            D Offline
            D Offline
            deepthy p m 0
            wrote on last edited by
            #5

            thanks for replay

            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