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

  • 相关阅读:
    微信带参数二维码保存至本地
    合并图片添加水印并压缩文件提供下载
    C#压缩文件夹坑~
    JS中Float类型加减乘除 修复
    JQ 操作 radio、checkbox 、select
    jquery.uploadifive 解决上传限制图片或文件大小
    2017好好写博客咯
    LINQ to SQL Count/Sum/Min/Max/Avg Join
    LINQ to SQL:Where、Select/Distinct
    微信开发那点事(No.001)
  • 原文地址:https://www.cnblogs.com/sandy_liao/p/1750211.html
Copyright © 2011-2022 走看看