zoukankan      html  css  js  c++  java
  • asp:DetailsView

    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()

  • 相关阅读:
    NPS平台,WCF学习
    QQ机器人Java版
    C#Linq To Entry
    C# AD域操作
    中国象棋软件制作感想
    WPF DataGrid 绑定BitmapSource
    DNN Tips
    Tools tips
    TRANSACTSQL Tips
    【阶段试题分析】阶段一试题总结
  • 原文地址:https://www.cnblogs.com/sandy_liao/p/1750211.html
Copyright © 2011-2022 走看看