List Info

Thread: Getting SelectParameter in the OnDataBinding event




Getting SelectParameter in the OnDataBinding event
user name
2006-12-01 07:20:04
Why not catch the on selected event and access the
parameters there?

-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailtoOTNET-WE
BDISCUSS.DEVELOP.COM] On Behalf Of Artem Koshelev
Sent: Thursday, November 30, 2006 8:11 AM
To: DOTNET-WEBDISCUSS.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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )