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

  • 相关阅读:
    idea 中main 方法运行错误二
    shiro 忘记加密后的密码怎么办?
    idea 中 Caused by: java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener
    Date 类型的比较
    oracle中数据类型对应java类型[转载]
    mybitis面试题基础必考 Mybatis 中$与#的区别
    301
    201
    0
    Apache负载 均衡
  • 原文地址:https://www.cnblogs.com/sandy_liao/p/1750211.html
Copyright © 2011-2022 走看看