How can i check textbox null inside masterpage
-
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 .
-
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 .
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.
-
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.
content page
-
content page
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.
-
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.
thanks for replay