Microsoft User control asp:DetailsView Co-operation with asp:SqlDataSource
1. asp:dataSource have many way to filter database
First solution is :
<...
FilterExpression=" textname = '{0}' ">
<FilterParameters>
<asp:ControlParameter ControlId="textname " PropertyName="SelectedValue"/>
</FilterParameters> when the anto dropdownlist refresh which selectedvalue will be working on.
Second solution is :
<.....
OnSelecting="dataResources_Selecting">
<SelectParameters>
<asp:ControlParameter ControlID="txt" Name="text" PropertyName="Text"
DefaultValue="%" />
<asp:QueryStringParameter Name="txt1" QueryStringField="txt1" />
</SelectParameters>
protected void dataResources_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{ ...... }
third solution strainghtaway
2. asp:DetailsView with asp:sqldatasource have
DetailsView1.DefaultMode = DetailsViewMode.Insert; / Update
SqlDataSource1.InsertParameters
SqlDataSource1.Insert()