Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
How to make button unclickable (visible but no click) untill you write something in textbox???
Posted 11-Feb-13 1:59am
Comments
   
button1.Enabled = false;
harshadptl4 at 11-Feb-13 8:31am
   
thanx.. buddy...
harshadptl4 at 21-Feb-13 2:58am
   
thanx
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use ^] property.
  Permalink  
Comments
Edo Tzumer at 11-Feb-13 9:17am
   
5+
Maciej Los at 11-Feb-13 9:20am
   
Thank you ;)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

LinkButton1.Enabled = false;
  Permalink  
Comments
Edo Tzumer at 11-Feb-13 9:18am
   
5+
Avik Ghosh22 at 11-Feb-13 11:02am
   
thanks bro...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You can do this in JS, see example code:
It goes over the input fields and checks if they have values in order to enable the submit button
<input type="submit" id="register" value="Register" disabled="disabled" />
 
...
 
(function() {
    $('form > input').keyup(function() {
 
        var empty = false;
        $('form > input').each(function() {
            if ($(this).val() == '') {
                empty = true;
            }
        });
 
        if (empty) {
            $('#register').attr('disabled', 'disabled'); 
        } else {
            $('#register').removeAttr('disabled'); 
        }
    });
})()
 
Cheers,
Edo
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

You can do this like
 
Button1.Enabled = false;
  Permalink  
Comments
harshadptl4 at 16-Feb-13 3:02am
   
got it/... :P
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

But disable option too disable button colours, how to unclickable button with out hiding its colour. there are any ways!!!???
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can use java script
        function TextChange() {
            var button = document.getElementById("Button1");          
            button.disabled = true; 
          
 

        }
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 mhegazy94 460
1 Sergey Alexandrovich Kryukov 460
2 Ravi Bhavnani 190
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,135
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,619
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web02 | 2.8.140922.1 | Last Updated 23 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100