问题描述
我需要检索SqlDataSource SelectParameter的值。我查看了'sqlSataSourceName.SelectParameters(ParameterName)。'属性列表中可用的属性,但它们都不涉及检索值...您可以获取DefaultValue,但不能获取值。
我想这个值可能会存储在这个sqldatasource正在填充的'GridViewName.DataSource'对象的某处...
有没有办法获得价值?
I need to retrieve the value of an SqlDataSource SelectParameter. I have looked at the properties available in the 'sqlSataSourceName.SelectParameters("ParameterName").' property list, but none of them relate to retrieving the value... you can get the DefaultValue, but not the value.
I suppose it's a possibility that the value may be stored somewhere in the 'GridViewName.DataSource' object that this sqldatasource is populating...
Is there any way of getting the value?
推荐答案
DataView testView = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
string test = testView[0]["Your Column Name"].ToString();
我希望它有帮助
I hope it helps
这篇关于检索SqlDataSource SelectParameters值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!