Getting SelectParameter in the OnDataBinding event
Artem Koshelev <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <!&!AAAAAAAAAAAYAAAAAAAAAJpaxsxjhzdKsmS4xpVqumbigAAAEAAAAI++5QwieSRNhSpzej0GDLwBAAAAAA==@gmail.com> |
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