Tuesday, 3 March 2020

Redirect to another page using java script in asp.net


Redirect to another page using java script in asp.net 


 <input type="text" id="txtsearch" autocomplete="off" class="search_input" placeholder="Search"
                    required="required">//this is textbox
                <button class="search_button" onclick="myid();">//this i my button
                    <i class="fa fa-search" aria-hidden="true"></i>

                </button>
<script>
        function myid() {
            var b = document.getElementById("txtsearch").value;
          
            document.write("");
            setTimeout('Redirect()', 0000);
            window.location.href = "SearchProduct.aspx?PID=" + b, true;
        }
    </script>

I hope this will helpful for you

Friday, 28 February 2020

How to get MAC Address in asp.net

 How to get MAC Address in asp.net

  string MACAdd = GetMACAddress();

  public string GetMACAddress()
    {
        string macAddresses = "";

        foreach (System.Net.NetworkInformation.NetworkInterface nic in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
        {
            if (nic.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)
            {
                macAddresses += nic.GetPhysicalAddress().ToString();
                break;
            }
        }
        return macAddresses;
    }

I got macaddress of my pc using this 

Monday, 24 February 2020

Zoom In Image Effect In asp.net

Zoom In Image Effect In asp.net

https://codepen.io/kw7oe/pen/mPeepv

Quick CSS snacks for Image hover-zoom effects

Quick CSS snacks for Image hover-zoom effects



view above link 

How to avoid/disable mouse right click on my page

How to avoid/disable mouse right click on my page


Use below code this will helpful for you
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
   $(document).bind("contextmenu",function(e){
      return false;
   });
});
</script>
</head>
<body>

<p>Right click is disabled on this page.</p>

</body>
</html>