.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();

}

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-17
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
相关资源
相似解决方案