Woops,
dsrc1.SelectParameters["param1"].DefaultValue
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Artem Koshelev
Sent: Wednesday, November 29, 2006 5:11 PM
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] Getting SelectParameter in the
OnDataBinding event
Hello
The example below is pretty simple. I'm trying to get the
parameter value in
the OnDataBinding event. The problem is that the
sss='param1', i.e. it is
the parameter name except of parameter value.
Sample code:
--------------------------------------------------------
<script>
void getParameter(Object sender, EventArgs e)
{
string sss = DataBinder.Eval(dsrc1,
"SelectParameters['param1']").ToString();
}
</script>
<asp:SqlDataSource ID="dsrc1"
SelectCommand="SELECT * FROM table WHERE
id= id">
<SelectParameters>
<asp:Parameter Name="param1"
Type="Boolean" Direction="Output"
DefaultValue="false" />
</SelectParameters>
</asp:SqlDataSource>
<asp:FormView>
<ItemTemplate>
<asp:Label OnDataBinding="getParameter"
/>
</ItemTemplate>
</asp:FormView>
----------------------------------------------------------
How can I get the parameter 'param1' value?
TIA
Best regards,
Artem
===================================
This list is hosted by DevelopMentor. http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|