Home All Groups Group Topic Archive Search About

Passing Values into Formview or DetailsView

Author
17 Feb 2006 2:15 PM
Desmond
Hi fellow techies I a problem trying to recreate a process using ASP.NET that
comes very easy for me in the desktop application programming side.

First I would like to know how to use values from a combo box as an input
value to a detailsview or a formview data control.

I am trying to update a table in a SQL database; however, I am trying to use
value from a list or combo box to pass to field(s) located in a detailview or
a formview

Any idea?

Also anyone knows of any good books that have the step-by-step examples
(including screen shots) for ASP.NET?

Thanks
--
Desmond
Data/ Business/ Information Analyst

Author
17 Feb 2006 3:04 PM
Phillip Williams
The DataSource object that you bind to either the FormView or DetailsView can
define SelectParameters where the controlParameter is a dropdownlist
selectedValue, e.g.
<SelectParameters>
    <asp:ControlParameter ControlID="ddlProducts" Name="productID"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>

For a complete sample code on using the dropdownlist to populate a
detailsView look at this demo:
http://www.webswapp.com/codesamples/aspnet20/dropdownlist_gridview/default.aspx
Show quoteHide quote
"Desmond" wrote:

> Hi fellow techies I a problem trying to recreate a process using ASP.NET that
> comes very easy for me in the desktop application programming side.
>
> First I would like to know how to use values from a combo box as an input
> value to a detailsview or a formview data control.
>
> I am trying to update a table in a SQL database; however, I am trying to use
> value from a list or combo box to pass to field(s) located in a detailview or
> a formview
>
> Any idea?
>
> Also anyone knows of any good books that have the step-by-step examples
> (including screen shots) for ASP.NET?
>
> Thanks
> --
> Desmond
> Data/ Business/ Information Analyst