3
Answers

Is there any open source git hub repo for SSO in .net?

Photo of Rinky Jain

Rinky Jain

1y
43
1

PostAnswer

Answers (3)

1
Photo of Vinay Singh
NA 5.9k 126.2k 8y
Hi
you can use jQuery code to perform the operation
Js Function
  1. <script src="http://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script>
  2. <script language="javascript">
  3. function EnableButton(){
  4. $('#Button1').prop("disabled",false);
  5. }
  6. function DisableButton(){
  7. $('#Button1').prop("disabled",true);
  8. }
  9. function ValidateContent()
  10. {
  11. if($('#txtFromDate').attr('value')=="" && $('#txtToDate').attr('value')=="")
  12. {
  13. DisableButton();
  14. }
  15. else
  16. {
  17. EnableButton();
  18. }
  19. }
  20. </script>
Now on textbox event
  1. FromDate: @Html.TextBox("txtFromDate", new{@onblur="javascript:ValidateContent();"})
  2. ToDate: @Html.TextBox("txtTodate", new{@onblur="javascript:ValidateContent();"})
for detail have a look of the link

http://www.aspdotnet-pools.com/2015/09/disable-and-enable-button-using-jquery.html