iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >ASP.NET中怎么实现一个数据绑定控件
  • 472
分享到

ASP.NET中怎么实现一个数据绑定控件

2023-06-18 00:06:46 472人浏览 薄情痞子
摘要

本篇文章给大家分享的是有关asp.net中怎么实现一个数据绑定控件,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。ASP.NET数据绑定控件一.回顾如果你使用过ASP.net内置

本篇文章给大家分享的是有关asp.net中怎么实现一个数据绑定控件,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

ASP.NET数据绑定控件一.回顾

如果你使用过ASP.net内置的数据控件(如DataList,Repeater),你一定会这么做

设置数据源 DataSource属性

调用数据绑定  DataBind方法

在控件的不同模板内使用绑定语法显示数据

这三步应该是必须要做的

其他更多的

你可能需要对绑定的数据进行统一的一些操作(如时间格式化),或者对数据的某一项进行操作(对某一项进行格式化),或者需要触发模板控件内的一些事件(如databound事件).

根据上面的一些需求,我们需要这样做

对绑定的数据进行统一的一些操作: 为数据绑定控件定义Item项(表示列表的一条数据, 如Repeater的RepeaterItem)

对数据的某一项进行操作: 因为定义了Item项,那你肯定需要一个ItemCollection集合,其可以方便的为你检索数据

因为定义了RepeaterItem,原先的EventArgs和CommandEventArgs已经无法满足需求,我们需要自定义委托及其一个为控件提供数据的的ItemEventArgs

上面三点有些并非必须定义,如第2点,还需要根据具体需求来定.但一个完成的控件是需要的.

ASP.NET数据绑定控件二.为数据控件做好准备

这次的demo为不完整的Datalist控件,来源还是MSDN的例子,我们命名为TemplatedList,此控件未定义ItemCollection集合

好了,根据上面的分析我们先为TemplatedList提供项和委托及为事件提供数据的几个EventArgs,请看下面类图

ASP.NET中怎么实现一个数据绑定控件

TemplatedListCommandEventArgs为Command事件提供数据

TemplatedListItemEventArgs为一般项提供数据

TemplatedListItem表示TemplatedList的项

ASP.NET数据绑定控件三.编写TemplatedList

TemplatedList主要功能简介

提供一个ItemTemplate模板属性,提供三种不同项样式,ItemCommand 事件冒泡事件及4个事件

ASP.NET中怎么实现一个数据绑定控件

实现主要步骤

以下为必须

(1)控件必须实现 System.WEB.UI.INaminGContainer 接口

(2)定义至少一个模板属性

(3)定义DataSource数据源属性

(4)定义控件项DataItem,即模板的一个容器

(5)重写DataBind 方法及复合控件相关方法(模板控件为特殊的复合控件)

当然还有其他额外的属性,样式,事件

具体实现

下面我们来具体看实现方法

(1)定义控件成员属性

#region 静态变量           private static readonly object EventSelectedIndexChanged = new object();          private static readonly object EventItemCreated = new object();          private static readonly object EventItemDataBound = new object();          private static readonly object EventItemCommand = new object();          #endregion           成员变量#region 成员变量          private IEnumerable dataSource;          private TableItemStyle itemStyle;          private TableItemStyle alternatingitemStyle;          private TableItemStyle selectedItemStyle;          private ITemplate itemTemplate;          #endregion           控件属性#region 控件属性           [          CateGory("Style"),          Description("交替项样式"),          DesignerSerializationVisibility(DesignerSerializationVisibility.Content),          NotifyParentProperty(true),          PersistenceMode(PersistenceMode.InnerProperty),          ]          public virtual TableItemStyle AlternatingItemStyle          {              get             {                  if (alternatingItemStyle == null)                  {                      alternatingItemStyle = new TableItemStyle();                      if (IsTrackingViewState)                          ((IStateManager)alternatingItemStyle).TrackViewState();                  }                  return alternatingItemStyle;              }          }            [          Category("Style"),          Description("一般项样式"),          DesignerSerializationVisibility(DesignerSerializationVisibility.Content),          NotifyParentProperty(true),          PersistenceMode(PersistenceMode.InnerProperty),          ]          public virtual TableItemStyle ItemStyle          {              get             {                  if (itemStyle == null)                  {                      itemStyle = new TableItemStyle();                      if (IsTrackingViewState)                          ((IStateManager)itemStyle).TrackViewState();                  }                  return itemStyle;              }          }           [           Category("Style"),           Description("选中项样式"),           DesignerSerializationVisibility(DesignerSerializationVisibility.Content),           NotifyParentProperty(true),           PersistenceMode(PersistenceMode.InnerProperty),           ]          public virtual TableItemStyle SelectedItemStyle          {              get             {                  if (selectedItemStyle == null)                  {                      selectedItemStyle = new TableItemStyle();                      if (IsTrackingViewState)                          ((IStateManager)selectedItemStyle).TrackViewState();                  }                  return selectedItemStyle;              }          }             [          Bindable(true),          Category("Appearance"),          DefaultValue(-1),          Description("The cell padding of the rendered table.")          ]          public virtual int CellPadding          {              get             {                  if (ControlStyleCreated == false)                  {                      return -1;                  }                  return ((TableStyle)ControlStyle).CellPadding;              }              set             {                  ((TableStyle)ControlStyle).CellPadding = value;              }          }           [          Bindable(true),          Category("Appearance"),          DefaultValue(0),          Description("The cell spacing of the rendered table.")          ]          public virtual int CellSpacing          {              get             {                  if (ControlStyleCreated == false)                  {                      return 0;                  }                  return ((TableStyle)ControlStyle).CellSpacing;              }              set             {                  ((TableStyle)ControlStyle).CellSpacing = value;              }          }             [          Bindable(true),          Category("Appearance"),          DefaultValue(GridLines.None),          Description("The grid lines to be shown in the rendered table.")          ]          public virtual GridLines GridLines          {              get             {                  if (ControlStyleCreated == false)                  {                      return GridLines.None;                  }                  return ((TableStyle)ControlStyle).GridLines;              }              set             {                  ((TableStyle)ControlStyle).GridLines = value;              }          }           [          Bindable(true),          Category("Data"),          DefaultValue(null),          Description("数据源"),          DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)          ]          public IEnumerable DataSource          {              get             {                  return dataSource;              }              set             {                  dataSource = value;              }          }            [          Browsable(false),          DefaultValue(null),          Description("项模板"),          PersistenceMode(PersistenceMode.InnerProperty),          TemplateContainer(typeof(TemplatedListItem))          ]          public virtual ITemplate ItemTemplate          {              get             {                  return itemTemplate;              }              set             {                  itemTemplate = value;              }          }            [          Bindable(true),          DefaultValue(-1),          Description("选中项索引,默认为-1")          ]          public virtual int SelectedIndex          {              get             {                  object o = ViewState["SelectedIndex"];                  if (o != null)                      return (int)o;                  return -1;              }              set             {                  if (value < -1)                  {                      throw new ArgumentOutOfRangeException();                  }                  //获取上次选中项                  int oldSelectedIndex = SelectedIndex;                  ViewState["SelectedIndex"] = value;                   if (HasControls())                  {                      Table table = (Table)Controls[0];                      TemplatedListItem item;                       //第一次选中项不执行                      if ((oldSelectedIndex != -1) && (table.Rows.Count > oldSelectedIndex))                      {                          item = (TemplatedListItem)table.Rows[oldSelectedIndex];                          //判断项类型,为了将选中项还原为数据项                          if (item.ItemType != ListItemType.EditItem)                          {                              ListItemType itemType = ListItemType.Item;                              if (oldSelectedIndex % 2 != 0)                                  itemType = ListItemType.AlternatingItem;                              item.SetItemType(itemType);                          }                      }                      //第一次执行此项,并一直执行                      if ((value != -1) && (table.Rows.Count > value))                      {                          item = (TemplatedListItem)table.Rows[value];                          item.SetItemType(ListItemType.SelectedItem);                      }                  }              }          }              #endregion

成员如下(可以看上面类图)

三个项样式和三个样式属性

公开DataSource数据源属性,一个模板属性

SelectedIndex索引属性

前面的相信大家都很容易明白,其中的三个项样式我们需要为其重写视图状态管理,不熟悉可以看以前的随笔,这里不再重复.

SelectedIndex属性比较复杂,这里重点介绍此属性

SelectedIndex索引属性默认为-1,

我给出了注释,在赋值前先记录下了上次的选中项,为恢复样式而做准备

//获取上次选中项   int oldSelectedIndex = SelectedIndex;   ViewState["SelectedIndex"] = value;

当第一次更改SelectedIndex属性时只执行下列代码(将此项标记为选中项),因为初始化时的没有oldSelectedIndex,不需要恢复样式

//第一次执行此项,并一直执行                      if ((value != -1) && (table.Rows.Count > value))                      {                          item = (TemplatedListItem)table.Rows[value];                          item.SetItemType(ListItemType.SelectedItem);                      }

再次执行时,恢复oldSelectedIndex选中项样式

//第一次选中项不执行  if ((oldSelectedIndex != -1) && (table.Rows.Count > oldSelectedIndex))  {      item = (TemplatedListItem)table.Rows[oldSelectedIndex];      //判断项类型,为了将选中项还原为数据项      if (item.ItemType != ListItemType.EditItem)      {          ListItemType itemType = ListItemType.Item;          if (oldSelectedIndex % 2 != 0)              itemType = ListItemType.AlternatingItem;          item.SetItemType(itemType);      }  }

相信这样的解释你会明白

(2)定义控件成员事件

我们可以用上刚才我们声明的委托了,即然你定义了这么多事件,就该为其安排触发的先后.所以这个要特别注意,等下会再次提到.

#region 事件          protected virtual void OnItemCommand(TemplatedListCommandEventArgs e)          {              TemplatedListCommandEventHandler onItemCommandHandler = (TemplatedListCommandEventHandler)Events[EventItemCommand];              if (onItemCommandHandler != null) onItemCommandHandler(this, e);          }           protected virtual void OnItemCreated(TemplatedListItemEventArgs e)          {              TemplatedListItemEventHandler onItemCreatedHandler = (TemplatedListItemEventHandler)Events[EventItemCreated];              if (onItemCreatedHandler != null) onItemCreatedHandler(this, e);          }           protected virtual void OnItemDataBound(TemplatedListItemEventArgs e)          {              TemplatedListItemEventHandler onItemDataBoundHandler = (TemplatedListItemEventHandler)Events[EventItemDataBound];              if (onItemDataBoundHandler != null) onItemDataBoundHandler(this, e);          }           protected virtual void OnSelectedIndexChanged(EventArgs e)          {              EventHandler handler = (EventHandler)Events[EventSelectedIndexChanged];              if (handler != null) handler(this, e);          }           [          Category("Action"),          Description("Raised when a CommandEvent occurs within an item.")          ]          public event TemplatedListCommandEventHandler ItemCommand          {              add              {                  Events.AddHandler(EventItemCommand, value);              }              remove              {                  Events.RemoveHandler(EventItemCommand, value);              }          }           [          Category("Behavior"),          Description("Raised when an item is created and is ready for customization.")          ]          public event TemplatedListItemEventHandler ItemCreated          {              add              {                  Events.AddHandler(EventItemCreated, value);              }              remove              {                  Events.RemoveHandler(EventItemCreated, value);              }          }           [          Category("Behavior"),          Description("Raised when an item is data-bound.")          ]          public event TemplatedListItemEventHandler ItemDataBound          {              add              {                  Events.AddHandler(EventItemDataBound, value);              }              remove              {                  Events.RemoveHandler(EventItemDataBound, value);              }          }           [          Category("Action"),          Description("Raised when the SelectedIndex property has changed.")          ]          public event EventHandler SelectedIndexChanged          {              add              {                  Events.AddHandler(EventSelectedIndexChanged, value);              }              remove              {                  Events.RemoveHandler(EventSelectedIndexChanged, value);              }          }          #endregion

(3)关键实现

我们为控件提供了这么多东西,剩下的事情就是要真正去实现功能了

重写DataBind方法

当控件绑定数据时首先会执行此方法触发DataBinding事件

//控件执行绑定时执行  public override void DataBind()  {       base.OnDataBinding(EventArgs.Empty);       //移除控件      Controls.Clear();      //清除视图状态信息      ClearChildViewState();       //创建一个带或不带指定数据源的控件层次结构      CreateControlHierarchy(true);      ChildControlsCreated = true;       TrackViewState();  }

CreateControlHierarchy方法

/// <summary>   /// 创建一个带或不带指定数据源的控件层次结构   /// </summary>   /// <param name="useDataSource">指示是否要使用指定的数据源</param>   //注意:当第二次执行数据绑定时,会执行两遍   private void CreateControlHierarchy(bool useDataSource)   {       IEnumerable dataSource = null;       int count = -1;         if (useDataSource == false)       {           // ViewState must have a non-null value for ItemCount because this is checked            //  by CreateChildControls.           count = (int)ViewState["ItemCount"];           if (count != -1)           {               dataSource = new DummyDataSource(count);           }       }       else      {           dataSource = this.dataSource;       }        //根据项类型开始创建子控件       if (dataSource != null)       {           Table table = new Table();           Controls.Add(table);            //选中项索引           int selectedItemIndex = SelectedIndex;           //项索引           int index = 0;           //项数量           count = 0;           foreach (object dataItem in dataSource)           {                ListItemType itemType = ListItemType.Item;               if (index == selectedItemIndex)               {                                     itemType = ListItemType.SelectedItem;               }               else if (index % 2 != 0)               {                   itemType = ListItemType.AlternatingItem;               }                //根据不同项索引创建样式               CreateItem(table, index, itemType, useDataSource, dataItem);               count++;               index++;           }       }       //执行绑定时执行时执行       if (useDataSource)       {           //保存项数量           ViewState["ItemCount"] = ((dataSource != null) ? count : -1);       }   }     //创建项   private TemplatedListItem CreateItem(Table table, int itemIndex, ListItemType itemType, bool dataBind, object dataItem)   {       TemplatedListItem item = new TemplatedListItem(itemIndex, itemType);       TemplatedListItemEventArgs e = new TemplatedListItemEventArgs(item);        if (itemTemplate != null)       {           itemTemplate.InstantiateIn(item.Cells[0]);       }       if (dataBind)       {           item.DataItem = dataItem;       }       //注意事件触发顺序       OnItemCreated(e);       table.Rows.Add(item);        if (dataBind)       {           item.DataBind();           OnItemDataBound(e);            item.DataItem = null;       }        return item;   }

CreateItem方法辅助用于创建项模板,此处注意事件触发顺序,上面已经提到过

此方法根据项索引创建控件中不同的Item项 ,ViewState["ItemCount"]表示项的数量,第一次触发时或者重新执行DataBind方法时方法参数为true,并在初始化以后(回发期间)CreateChildControls方法会调用此方法,其参数为false

数据源不再是实际的数据源,而是新定义的DummyDataSource,其主要实现了一个迭代

internal sealed class DummyDataSource : ICollection      {           private int dataItemCount;           public DummyDataSource(int dataItemCount)          {              this.dataItemCount = dataItemCount;          }           public int Count          {              get             {                  return dataItemCount;              }          }           public bool IsReadOnly          {              get             {                  return false;              }          }           public bool IsSynchronized          {              get             {                  return false;              }          }           public object SyncRoot          {              get             {                  return this;              }          }           public void CopyTo(Array array, int index)          {              for (IEnumerator e = this.GetEnumerator(); e.MoveNext(); )                  array.SetValue(e.Current, index++);          }           public IEnumerator GetEnumerator()          {              return new DummyDataSourceEnumerator(dataItemCount);          }           private class DummyDataSourceEnumerator : IEnumerator          {               private int count;              private int index;               public DummyDataSourceEnumerator(int count)              {                  this.count = count;                  this.index = -1;              }               public object Current              {                  get                 {                      return null;                  }              }               public bool MoveNext()              {                  index++;                  return index < count;              }               public void Reset()              {                  this.index = -1;              }          }      }

原因很明显,为了减少对数据源的访问,所以我们平时操作数据的时候,必须重新执行DataBind方法,原因就在此

好了,到了这里差不多主要的事情我们已经完成.接着把剩下的也完成

呈现

又到了Render方法这里了

此方法体只要执行了PrepareControlHierarchy方法,不同的方法做不同的事情,CreateControlHierarchy方法根据索引值指定了不同的项,PrepareControlHierarchy则为不同项呈现不同的样式效果

//为不同类型项加载样式  private void PrepareControlHierarchy()  {      if (HasControls() == false)      {          return;      }       Debug.Assert(Controls[0] is Table);      Table table = (Table)Controls[0];       table.CopyBaseAttributes(this);      if (ControlStyleCreated)      {          table.ApplyStyle(ControlStyle);      }       // The composite alternating item style; do just one      // merge style on the actual item.      Style altItemStyle = null;      if (alternatingItemStyle != null)      {          altItemStyle = new TableItemStyle();          altItemStyle.CopyFrom(itemStyle);          altItemStyle.CopyFrom(alternatingItemStyle);      }      else     {          altItemStyle = itemStyle;      }       int rowCount = table.Rows.Count;      for (int i = 0; i < rowCount; i++)      {          TemplatedListItem item = (TemplatedListItem)table.Rows[i];          Style compositeStyle = null;          //根据不同项加载不同样式          switch (item.ItemType)          {              case ListItemType.Item:                  compositeStyle = itemStyle;                  break;               case ListItemType.AlternatingItem:                  compositeStyle = altItemStyle;                  break;               case ListItemType.SelectedItem:                  {                      compositeStyle = new TableItemStyle();                       if (item.ItemIndex % 2 != 0)                          compositeStyle.CopyFrom(altItemStyle);                      else                         compositeStyle.CopyFrom(itemStyle);                      compositeStyle.CopyFrom(selectedItemStyle);                  }                  break;          }           if (compositeStyle != null)          {              item.MergeStyle(compositeStyle);          }      }  }   //控件呈现  protected override void Render(htmlTextWriter writer)  {      // Apply styles to the control hierarchy      // and then render it out.       // Apply styles during render phase, so the user can change styles      // after calling DataBind without the property changes ending      // up in view state.      PrepareControlHierarchy();       RenderContents(writer);  }

终于差不多了,经过这么多步骤,我们终于完成了,让我们来使用控件,看一下效果

ASP.NET中怎么实现一个数据绑定控件

以上就是ASP.NET中怎么实现一个数据绑定控件,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网精选频道。

--结束END--

本文标题: ASP.NET中怎么实现一个数据绑定控件

本文链接: https://www.lsjlt.com/news/294952.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • ASP.NET中怎么实现一个数据绑定控件
    本篇文章给大家分享的是有关ASP.NET中怎么实现一个数据绑定控件,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。ASP.NET数据绑定控件一.回顾如果你使用过ASP.NET内置...
    99+
    2023-06-18
  • ASP.NET实现Repeater控件的数据绑定
    Repeater基础 在aspx文件中加入Repeater 控件,在<ItemTemplate></ItemTemplate>包含的范围里加入自己控制的代码,...
    99+
    2024-04-02
  • ASP.NET中怎么实现一个复合控件
    这篇文章给大家介绍ASP.NET中怎么实现一个复合控件,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。ASP.NET复合控件的呈现引擎在深入探讨 ASP.NET 2.0 编码技术之前,让我们回顾一下复合控件的内部例行过程...
    99+
    2023-06-18
  • ASP.NET 中怎么利用Eval实现数据绑定
    本篇文章给大家分享的是有关ASP.NET 中怎么利用Eval实现数据绑定,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。ASP.NET Eval 2.0 的数据绑定函数Eval(...
    99+
    2023-06-17
  • 怎么实现DataGridView控件的数据绑定
    这篇文章主要介绍了怎么实现DataGridView控件的数据绑定,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。使用DataGridView控件,可以显示和编辑来自多种不同类型...
    99+
    2023-06-29
  • ASP.NET中DropDownList下拉框列表控件怎么绑定数据
    在ASP.NET中,可以通过以下步骤来绑定数据到DropDownList下拉框列表控件: 在前端页面(.aspx文件)中...
    99+
    2024-03-02
    ASP.NET
  • ASP.NET中怎么实现一个服务器控件
    ASP.NET中怎么实现一个服务器控件,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。ASP.NET组件设计之ASP.NET服务器控件1、用户控件类似page,基本上不需要编程,...
    99+
    2023-06-18
  • winform控件怎么绑定数据源
    在WinForms中,可以通过以下步骤将控件绑定到数据源: 首先,确保已创建或存在一个数据源。这可以是一个数据表、一个集合或其他...
    99+
    2024-02-29
    winform
  • 怎么使用DataGrid控件绑定数据
    要使用DataGrid控件绑定数据,您可以按照以下步骤进行操作:1. 首先,确保您已经在项目中添加了DataGrid控件。这通常涉及...
    99+
    2023-10-10
    DataGrid
  • VB.NET中怎么实现数据绑定
    本篇文章给大家分享的是有关VB.NET中怎么实现数据绑定,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。TextBox组件通过下列语句就可以把已经得到的数据集"myDa...
    99+
    2023-06-17
  • VB.NET中怎么实现一个控件数组
    本篇文章为大家展示了VB.NET中怎么实现一个控件数组,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。Public Class CheckBoxArrClass Chec...
    99+
    2023-06-17
  • Flex中怎么实现数据绑定
    Flex中怎么实现数据绑定,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。首先来看一下这个例子最终完成的Demo演示:下面来看看是如何实现这套机制的,首先我们来创建一个可绑定...
    99+
    2023-06-17
  • 怎么在Android中实现一个自定义控件
    今天就跟大家聊聊有关怎么在Android中实现一个自定义控件,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。首先定义一个layout实现按钮内部布局:<xml vers...
    99+
    2023-05-31
    android
  • ASP.NET复合控件引发数据绑定事件的示例分析
    这篇文章主要为大家展示了“ASP.NET复合控件引发数据绑定事件的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“ASP.NET复合控件引发数据绑定事件的示例分析”这篇文章吧。生成数据绑定...
    99+
    2023-06-18
  • winform数据绑定控件是什么
    WinForm数据绑定控件是一组用于将数据与Windows Forms应用程序中的控件进行绑定的工具和组件。这些控件包括数据源控件、...
    99+
    2023-10-12
    winform
  • layui数据绑定怎么实现
    在layui中,可以通过使用模板引擎来实现数据绑定。以下是一个实现数据绑定的示例代码:1. 在HTML中定义一个模板:```html...
    99+
    2023-09-15
    layui
  • Flex怎么实现数据绑定
    小编给大家分享一下Flex怎么实现数据绑定,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Flex数据绑定的概念从字面上看,“绑定”表示将若干个物体捆绑在一起。使用...
    99+
    2023-06-17
  • elementUI select控件怎么绑定多个值
    这篇文章主要介绍“elementUI select控件怎么绑定多个值”,在日常操作中,相信很多人在elementUI select控件怎么绑定多个值问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家...
    99+
    2023-07-05
  • VB.NET 中怎么实现一个Label控件
    VB.NET 中怎么实现一个Label控件,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。1.设置标签的文本在VB.NET Label控件中显示文本,使用“Text”属性。在开发...
    99+
    2023-06-17
  • Vue中怎么实现数据双向绑定
    这篇文章主要介绍了Vue中怎么实现数据双向绑定的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Vue中怎么实现数据双向绑定文章都会有所收获,下面我们一起来看看吧。在我们使用vue的时候,当数据发生了改变,界面也会...
    99+
    2023-07-04
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作