Ajax.Utility.RegisterTypeForAjax(typeof(sp))
插入 page_load 中

[Ajax.AjaxMethod()]
  public int addvideoplaylist(string id,string PARTY_ID)
  {
   int b=0;
   if(!"".Equals(PARTY_ID) && !"".Equals(id))
   {
    string sqlstr =string.Format("insert into mycollection(videoid,PARTY_ID) values({0},'{1}')",id,PARTY_ID);
    sql.MycollectionSqls.addMyCollection(sqlstr);
    string message="视频添加成功!";
    Page.Response.Write("<script>alert('"+message+"')</"+"scrip>");
   }
   else
   {
    b=1;
   }
   return b;
  }

返回的值是一个对象,要用 .value 来获得值

相关文章:

  • 2021-08-01
  • 2021-12-20
  • 2022-02-28
  • 2022-12-23
  • 2021-10-07
  • 2021-12-25
  • 2021-11-29
  • 2021-05-10
猜你喜欢
  • 2021-06-23
  • 2021-11-26
  • 2021-09-19
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案