Re: Getting SelectParameter in the OnDataBinding event

IMPlatform <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
Why not catch the on selected event and access the parameters there?

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:[email protected]] On Behalf Of Artem Koshelev
Sent: Thursday, November 30, 2006 8:11 AM
To: [email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.