例如在客户端选择了某个选项后就提交就能指定postbackurl
如何做到呢

解决方案 »

  1.   

    能。
    但还是建议换个思路。
    比如JS把值赋到某个控件上,提交服务器的时候再读这个控件,再把PostBackUrl赋过去
      

  2.   

    以前在1.1下是这样来做的,加一个linkButton,不给这个linkButton设置任何东西,使其在页面上不可见。然后就可以很方便的使用postback了(onclick="__dopostback(...))。
      

  3.   

    我打算用js来控制form的action值
    是能跳转了
    但出错了
    跳本页的话没什么问题
    但跳另一页的话就出错
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.不太清楚这里说什么错