Change the property “DefaultValue” of the asp.net “ControlParameter” control with javascript

前端 未结 1 958
醉酒成梦
醉酒成梦 2021-01-29 01:41

I already have an idea on how to do this, but I realized that the control \"ControlParameter\" did not have an \"Id\" property (which is needed for the JS). Is there a different

相关标签:
1条回答
  • 2021-01-29 02:04

    You can't access a ControlParameter client side. ControlParameters are used to bind the value of a Control property server side, they are not rendered to the client. You can, however, set the Default value of the ControlParameter programmatically in your Code Behind.

    SqlDataSource1.SelectParameters["id"].DefaultValue = "value";
    
    0 讨论(0)
提交回复
热议问题