<td class="td_top_border"><asp:TextBox ID="txtLowTemperatures" CssClass="input01 w50" runat="server" style="text-align:right; ime-mode:disabled;" Text="0" /> ℃</td>

 

 

#region 숫자만 입력되게 처리
            TextBox[] txtboxArray = { txtHecKrDispatch, txtHecKrPJT, txtHecKrFunction, txtHecTnStaff, txtHecTnFunction, txtHecLcStaff, txtHecLcFunction, txtPartnerKr, txtPartnerTn, txtPartnerLc, txtLowTemperatures, txtHeightTemperatures, txtPrecipitation, txtRainFallTime, txtStopWorkTime };
            KeyInputOnlyNumber(txtboxArray);

            TextBox[] txtboxFoaltArray = { txtLowTemperatures, txtHeightTemperatures, txtPrecipitation, txtRainFallTime, txtStopWorkTime };
            KeyInputOnlyFoalt(txtboxFoaltArray);
            #endregion

            if (!IsPostBack)
            {}

 

 

#region 숫자만 입력
    protected void KeyInputOnlyNumber(TextBox[] txtBoxList)
    {
        for (int i = 0; i < txtBoxList.Length; i++)
        {
            txtBoxList[i].Attributes["onkeypress"] = "if( ((event.keyCode < 48 ) || (event.keyCode > 57)) ) { return false; }";
        }
    }

    protected void KeyInputOnlyFoalt(TextBox[] txtBoxList)
    {
        for (int i = 0; i < txtBoxList.Length; i++)
        {
            txtBoxList[i].Attributes["onkeypress"] = "return DemicalNumberCheck(event);";
        }
    }
    #endregion

'IT > C#' 카테고리의 다른 글

쿼리에서 DataTable 만들기(LINQ to DataSet)  (0) 2018.01.16
c# 숫자 콤마 keypress  (0) 2018.01.04
숫자만 입력하게하기  (0) 2017.12.18
pdf 변환 다운로드  (0) 2017.02.10
로딩바 화면 구현  (0) 2017.01.17

+ Recent posts

<td class="td_top_border"><asp:TextBox ID="txtLowTemperatures" CssClass="input01 w50" runat="server" style="text-align:right; ime-mode:disabled;" Text="0" /> ℃</td>

 

 

#region 숫자만 입력되게 처리
            TextBox[] txtboxArray = { txtHecKrDispatch, txtHecKrPJT, txtHecKrFunction, txtHecTnStaff, txtHecTnFunction, txtHecLcStaff, txtHecLcFunction, txtPartnerKr, txtPartnerTn, txtPartnerLc, txtLowTemperatures, txtHeightTemperatures, txtPrecipitation, txtRainFallTime, txtStopWorkTime };
            KeyInputOnlyNumber(txtboxArray);

            TextBox[] txtboxFoaltArray = { txtLowTemperatures, txtHeightTemperatures, txtPrecipitation, txtRainFallTime, txtStopWorkTime };
            KeyInputOnlyFoalt(txtboxFoaltArray);
            #endregion

            if (!IsPostBack)
            {}

 

 

#region 숫자만 입력
    protected void KeyInputOnlyNumber(TextBox[] txtBoxList)
    {
        for (int i = 0; i < txtBoxList.Length; i++)
        {
            txtBoxList[i].Attributes["onkeypress"] = "if( ((event.keyCode < 48 ) || (event.keyCode > 57)) ) { return false; }";
        }
    }

    protected void KeyInputOnlyFoalt(TextBox[] txtBoxList)
    {
        for (int i = 0; i < txtBoxList.Length; i++)
        {
            txtBoxList[i].Attributes["onkeypress"] = "return DemicalNumberCheck(event);";
        }
    }
    #endregion

'IT > C#' 카테고리의 다른 글

쿼리에서 DataTable 만들기(LINQ to DataSet)  (0) 2018.01.16
c# 숫자 콤마 keypress  (0) 2018.01.04
숫자만 입력하게하기  (0) 2017.12.18
pdf 변환 다운로드  (0) 2017.02.10
로딩바 화면 구현  (0) 2017.01.17

+ Recent posts