小编use*_*405的帖子

下拉列表选择的值不起作用

在我的ASP.NET项目中.我有两个下拉列表和一个复选框.选中该复选框后,所选值DropDownList1必须与选中的值相同DropDownList2.但是DropDownList1.SelectedValue没有用.

这是我的代码:

protected void chkSameBAddress_CheckedChanged(object sender, EventArgs e)
{
    try
    {
        if (this.chkSameBAddress.Checked == true)
        {

          this.txtcSAddress1.Text=  this.txtcBAddress1.Text;
          this.txtcSAddress2.Text = this.txtcBAddress2.Text;
          this.txtcSAddress3.Text = this.txtcBAddress3.Text;
          this.txtcSAddress4.Text = this.txtcBAddress4.Text;
          this.txtcSCity.Text = this.txtcBCity.Text;
          this.txtcSPostCode.Text = this.txtcBPostCode.Text;
          this.txtcSState.Text = this.txtcBState.Text;

          this.ddlcSCountry.Items.FindByValue(ddlcBCountry.SelectedItem.Value).Selected = true;


        }

    }
    catch (Exception ex)
    {
        logger.Error(ex.Message);
        throw;

    }
}
Run Code Online (Sandbox Code Playgroud)

如上例所示,如果选中chkSmaeBAddress,则所选的ddlcSCountry值必须与ddlcBCountry选定值相同.

c# asp.net selectedvalue drop-down-menu

11
推荐指数
1
解决办法
5万
查看次数

在水平列表中显示多个项目

我是sencha touch的新手.在这里我遇到了一个问题,我怎么能显示每行只包含3或4项?

请看下面我的屏幕截图 在此输入图像描述

我需要像下面的示例一样显示列表 在此输入图像描述

这是我的视图js文件

        Ext.define('bluebutton.view.BlueButton.CouponList', {
        extend: 'Ext.dataview.DataView',
        xtype: 'couponlist',
        requires: [
            'Ext.field.Select',
            'Ext.field.Search',
            'bluebutton.view.BlueButton.MemberDetail',
             'Ext.plugin.ListPaging',
            'Ext.plugin.PullRefresh'

        ],
        config: {

            styleHtmlContent: true,
            scrollable: 'vertical',

             store : { xclass : 'bluebutton.store.BlueButton.MemberList'},
            grouped: true,
            indexBar: true,
             autoLoad: false,
           disclosure: true,
           cls:'customHeader',

            id :'memberlist',
            items: [
                {



                }

            ],
inline: { wrap: false },
            emptyText: '<p class="no-search-results">No member record found matching that search</p>',
            itemTpl: Ext.create(
                'Ext.XTemplate',


    //             '<div class="image" style="background-image:url(http://resources.shopstyle.com/static/mobile/image2-iPad/{urlId}.png)"></div>',
    //            '<div class="name">{memberId}</div>'


                   '<div class="demo-weather">',
                                '<tpl for=".">',
                                    '<div class="day">',
                                        '<div class="date">{memberId}</div>',
                                        '<tpl …
Run Code Online (Sandbox Code Playgroud)

horizontallist sencha-touch-2

6
推荐指数
2
解决办法
6952
查看次数

log4net无法在发布到服务器时创建日志文件

我正在使用log4net来记录我的asp.net应用程序.但是,当我在localhost上运行时,日志文件运行良好.但是当我发布到IIS时,log4net无法创建日志文件.我可以知道这是什么问题吗?我错过了任何配置吗?

这是我的log4net.config.

 <log4net debug="true">
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
  <param name="File" value="D:\\LewreLogFile1.log"/>
  <appendToFile value="true" />
  <rollingStyle value="Size" />
  <maxSizeRollBackups value="10" />
  <maximumFileSize value="10MB" />
  <staticLogFileName value="true" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
  </layout>
</appender>
<logger name="File">
  <level value="All" />
</logger>
<root>
  <level value="All" />
  <appender-ref ref="LogFileAppender" />
</root>
Run Code Online (Sandbox Code Playgroud)

和我的global.asax

 void Application_Start(object sender, EventArgs e)
    {
        string l4net = Server.MapPath("~/log4Net.config");
        log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(l4net));

    }
Run Code Online (Sandbox Code Playgroud)

c# asp.net iis log4net publish

5
推荐指数
1
解决办法
4615
查看次数

全局变量sencha touch 2.1

嗨,我需要定义一个全局变量,以便在我的应用程序的任何地方使用.我声明一个全局变量的baseUrl在我app.js.请参阅下面的app.js

    //<debug>
Ext.Loader.setPath({
    'Ext': 'touch/src',//Location of the sencha touch source files
    'bluebutton': 'app',



});
//</debug>



Ext.application({
    name: 'bluebutton',//Application Path, all classes in you app. For eg blueButton.view.Main.case sensitive

    views: ['Main',

    'BlueButton.CouponMain',
    'BlueButton.CouponList',
    'BlueButton.CouponList2',
    'BlueButton.CouponList3',

    'BlueButton.TransactionMain',


    ],



   stores : [
   'BlueButton.GlobalVariable',


   ], 

    models : ['BlueButton.GlobalVariable',
    'BlueButton.MemberDetail',


     ],



    controllers: ['Main', 
    'BlueButton.MemberList', 


    ],



    requires: [
        'Ext.MessageBox',

    ],

    icon: {
        '57': 'resources/icons/Icon.png',
        '72': 'resources/icons/Icon~ipad.png',
        '114': 'resources/icons/Icon@2x.png',
        '144': 'resources/icons/Icon~ipad@2x.png'
    },

    isIconPrecomposed: true,

    startupImage: {
        '320x460': 'resources/startup/320x460.jpg',
        '640x920': 'resources/startup/640x920.png',
        '768x1004': 'resources/startup/768x1004.png',
        '748x1024': …
Run Code Online (Sandbox Code Playgroud)

global-variables sencha-touch-2.1

5
推荐指数
1
解决办法
6997
查看次数

Asp.net 5 mvc 6获取查询字符串进行查看

我一直在谷歌上搜索几个小时.但仍然无法得到答案.我需要在剃刀视图中获取查询字符串参数.

这是我的代码:

              if @(Request.Query["value"]=="P"){

                    <a href="@Url.Action("Index", "Staff",new { status = "A"})"><strong>Active (@ViewData["activeCount"]) </strong></a> &nbsp;
                    <a href="@Url.Action("Index", "Staff",new { status = "I" })">In-Active (@ViewData["inActiveCount"])</a>&nbsp;
                    <a href="@Url.Action("Index", "Staff",new { status = "D" })">Delete (@ViewData["deleteCount"])</a>&nbsp;
               }else{
                    <a href="@Url.Action("Index", "Staff",new { status = "A"})">Active (@ViewData["activeCount"])</a> &nbsp;
                    <a href="@Url.Action("Index", "Staff",new { status = "I" })"><strong>In-Active (@ViewData["inActiveCount"])<strong></a>&nbsp;
                    <a href="@Url.Action("Index", "Staff",new { status = "D" })">Delete (@ViewData["deleteCount"])</a>&nbsp;

               }
Run Code Online (Sandbox Code Playgroud)

但我收到错误" 当前上下文中不存在名称'请求' "

截图 在此输入图像描述 谁有解决方案?谢谢

query-string asp.net-core-mvc

5
推荐指数
1
解决办法
6355
查看次数

SQL Server:自动递增字符 pk

表上是否可以有一个 char 主键?例如“WC001”将自动加1,因此pk的下一条记录将是“WC002”,依此类推。

谁能给我举个例子吗?

谢谢

sql-server char auto-increment

2
推荐指数
1
解决办法
1万
查看次数

无法在sencha touch 2中获得商店

我在sencha touch中定义了商店如下:

store.js

  Ext.define('bluebutton.store.BlueButton.Testing', {
    extend: "Ext.data.Store",
    requires: [
              'bluebutton.model.BlueButton.Testing'
    ],
    config: {
        storeId: 'testingstore',
        model: 'bluebutton.model.BlueButton.Testing'
    }
});
Run Code Online (Sandbox Code Playgroud)

Model.js

    Ext.define('bluebutton.model.BlueButton.Testing', {
    extend: 'Ext.data.Model',

    requires: [
             'Ext.data.proxy.LocalStorage'
    ],

    config: {
        fields: [
            { name: 'first', type: 'string' },
            { name: 'second', type: 'string' }
        ],
        proxy: {
            type: 'localstorage',
            id: '_codeAnalyzerLocalStorage'
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

我需要调用getStore()

    Ext.define('bluebutton.view.BlueButton.testing', {
    extend: 'Ext.form.Panel',
    xtype: 'testing',
       requires: [

    'bluebutton.view.BlueButton.TransactionList',
    'bluebutton.view.BlueButton.MemberPopUp',
     'bluebutton.view.BlueButton.MemberDetail',
     'bluebutton.store.BlueButton.MemberList',

     'bluebutton.model.BlueButton.Testing',
     'bluebutton.store.BlueButton.Testing'




    ],

    config: {
     id:'register',
        items :[

              {
                    xtype: 'textfield',
                    name: 'name', …
Run Code Online (Sandbox Code Playgroud)

store undefined sencha-touch-2

2
推荐指数
1
解决办法
7680
查看次数

使用jQuery将标签更改为文本框?

如何使用jQuery将标签更改为文本框?例如,我有2个按钮,一个是编辑,另一个是视图.当用户单击编辑按钮时,所有标签控件将变为文本框.另一方面,当使用时单击视图按钮,所有文本框将更改为标签.我知道我可以使用"可见"属性来显示某些控件.但是我的页面控制太多了.它花了我很多时间来编码.任何人都可以帮助我吗?

asp.net jquery label textbox

1
推荐指数
1
解决办法
7742
查看次数