我怎样才能设置SqlDataSource的参数的值? [英] How can I set the sqldatasource parameter's value?

查看:327
本文介绍了我怎样才能设置SqlDataSource的参数的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将的SqlDataSource 的SelectCommand 参数的值 @ClientID 如下code,但它不工作了。

I'm trying to set the value of the sqldatasource's selectcommand parameter @ClientID as in the code below, but it's not working out.

Dim strCommand = "SELECT caller_id, phone, name, email FROM callers WHERE client_id=@ClientID"

SqlDataSource2.SelectCommand = strCommand

SqlDataSource2.SelectParameters.Add("@ClientID", iClientID)

我在做什么错了?

What am I doing wrong?

推荐答案

不要介意...配置数据源的参数来拍摄另一控件的值。

Never mind...configured the datasource's parameter to take the value of another control..

这篇关于我怎样才能设置SqlDataSource的参数的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆