Re: Getting SelectParameter in the OnDataBinding event
"David B. Bitton" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Organization | Code No Evil, LLC |
| Message-ID | <018f01c71751$daef8ab0$90cea010$@com> |
Woops, dsrc1.SelectParameters["param1"].DefaultValue -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:[email protected]] On Behalf Of Artem Koshelev Sent: Wednesday, November 29, 2006 5:11 PM 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