Let’s say you have 2 buttons on your web page. <form id=”form1″ runat=”server”> <asp:Button ID=”Button1″ runat=”server” Text=”Button1″ OnClick=”Button1_Clicked” /> <asp:Button ID=”Button2″ runat=”server” Text=”Button2″ /> </form> Scenario 1: Disabling the specific button <script type=”text/javascript”> function DisableButton() { document.getElementById(“<%=Button1.ClientID %>”).disabled = true; } window.onbeforeunload = DisableButton; </script> The DisableButton JavaScript function is used for disabling specific Button when Clicked. […]
Tag: double
How to check column data types of a table in SQL
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=’your_table_name’;
How to use Template literals (Template strings) in Javascript
Template literals are enclosed by the backtick (` `) character instead of double or single quotes. Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between the backticks (` `) get passed to a function. let myUnOrderedList = [‘Record1’, ‘Record2’, […]
How to format decimal number like “00.00” in ReportViewer
=Format(CDbl(Fields!YourDecimalNumber.Value),”00.00″) OUTPUT for 3,2: 03.20 for 34: 34.00
How to split numeric and decimal parts in ReportViewer
‘Int’ Function returns the integer protion of a number. For integer part: =Int(3.14159) -> This gives the number 3 or you can use with that value comes from DataSource =Int(Fields!TheDataSourceField.Value) For decimal part: =3.14159 – Int(3.14159) -> This gives a value close to 0.14159 or you can use with that value comes from DataSource =Fields!TheDataSourceField.Value […]