.aspx

 

<ext:Button ID="Button1" runat="server" Text="2*2=?" Icon="Lightning">

<Listeners>

<Click Handler="

        Ext.net.DirectMethods.GetTimeStamp(2,{

         success: function (result) {

          txtGet.setValue(result);

}

});" />

</Listeners>

</ext:Button>

<ext:TextField ID="txtGet" runat="server" FieldLabel="显示结果"></ext:TextField>

.cs代码:

 

[DirectMethod]

public string GetTimeStamp(int value)

{

     int result = value * value;

     return result.ToString();

}

相关文章:

  • 2021-06-26
  • 2021-11-07
  • 2021-12-04
  • 2021-12-05
  • 2021-12-09
  • 2021-11-27
  • 2021-12-17
  • 2021-07-12
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2021-12-03
  • 2022-01-07
  • 2021-06-15
  • 2021-11-27
  • 2021-11-18
相关资源
相似解决方案