⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 metabuilders.webcontrols.dynamiclistbox.xml

📁 实现DualList列表的Web自定义控件
💻 XML
📖 第 1 页 / 共 2 页
字号:
            Gets or sets the visibility of the buttons for moving items up and down within the list on the right side of the control.
            </summary>
        </member>
        <member name="P:MetaBuilders.WebControls.DualList.Enabled">
            <summary>
            Overrides <see cref="P:System.Web.UI.WebControls.WebControl.Enabled"/>
            </summary>
        </member>
        <member name="P:MetaBuilders.WebControls.DualList.ButtonStyle">
            <summary>
            Gets the <see cref="P:System.Web.UI.WebControls.WebControl.ControlStyle"/> of the buttons contained in the control.
            </summary>
        </member>
        <member name="T:MetaBuilders.WebControls.DynamicListBox">
            <summary>
            A ListBox which can retrieve and persist any client-side changes to its Items collection.
            </summary>
            <remarks>
            <p>
            In order for your client-side changes to be persisted, 
            you must call new javascript methods on the ListBox.
            This Select element now has "Add" and "Remove" methods.
            The Add method takes the value, text, and optional index of the new ListItem.
            The Remove method takes the index of the ListItem to remove.
            </p>
            <p>By default, the clientscript used by the control is emited directly into the page.
            In order to save bandwidth, it's possible to have the control to use a script reference instead,
            but this requires the following handler to be added to the httpHandlers section of web.config.</p>
            <code>
            &lt;httpHandlers&gt;
            	&lt;add verb="*"
            		path="MetaBuilders_WebControls_DynamicListBoxResourceHandler.axd"
            		type="MetaBuilders.WebControls.DynamicListBoxResourceHandler,MetaBuilders.WebControls.DynamicListBox"
            		validate="false"
            	/&gt;
            &lt;/httpHandlers&gt;
            </code>
            </remarks>
            <example>
            The following is an example of how to combine the DynamicListBox with client-script in your page.
            <code><![CDATA[
            <%@ Page Language="C#" %>
            <%@ Register TagPrefix="mb" Namespace="MetaBuilders.WebControls" Assembly="MetaBuilders.WebControls.DynamicListBox" %>
            <script runat="server">
            
            	protected void Page_Load( Object sender, EventArgs e ) {
            		RegisterClientScriptBlock( MyList.ClientID, "<script>\r\nwindow.MyListId='" + MyList.ClientID + "';\r\n</" + "script>");
            	}
                protected void MyList_ListChanged( Object sender, EventArgs e ) {
                    if( MyList.SelectedIndex == -1 ) {
                        Result.Text = "The SelectedIndex changed and now nothing on the list is selected";
                    } else {
                        Result.Text = "The SelectedIndex changed and is now '" + MyList.SelectedIndex + "'<br>The selected item is: " + MyList.SelectedItem.Value + "/" + MyList.SelectedItem.Text;
                    }
                }
            
            </script>
            <html><body><form runat="server">
            	
                <mb:DynamicListBox id="MyList" runat="server" OnSelectedIndexChanged="MyList_ListChanged" SelectionMode="Multiple" >
                    <asp:ListItem value="normalItem1" text="normalItem1"></asp:ListItem>
                    <asp:ListItem value="normalItem2" text="normalItem2"></asp:ListItem>
                </mb:DynamicListBox>
                
                <br><br>
                <a href="javascript:remove();" >Remove</a>
                <a href="javascript:add();" >Add</a>
                <script>
            		function remove() {
            			var list = DynamicListBox_FindControl(window.MyListId);
            			var keepLooking = true;
            			while ( keepLooking ) {
            				list.Remove( list.options.selectedIndex );
            				if ( list.options.selectedIndex < 0 ) {
            					keepLooking = false;
            				}
            			}
            		}
            		
            		function add() {
            			var list = DynamicListBox_FindControl(window.MyListId);
            			var generatedName = "newItem" + ( list.options.length + 1 );
            			list.Add(generatedName,generatedName);
            		}
                </script>
                
                <br><br>
                <asp:Button runat="server" text="Smack"/>
                
                <br><br>
                <asp:Label runat="server" id="Result" />
                
            </form></body></html>
            ]]></code></example>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.CreateChildControls">
            <summary>
            Overridden to include the hidden input which tracks the client side changes.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.OnPreRender(System.EventArgs)">
            <summary>
            Overridden to register client script.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.RenderEndTag(System.Web.UI.HtmlTextWriter)">
            <summary>
            Overridden to render children after the end tag.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.OnItemsChanged(System.EventArgs)">
            <summary>
            Raises the <see cref="E:MetaBuilders.WebControls.DynamicListBox.ItemsChanged"/> event.
            </summary>
            <param name="e"></param>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.System#Web#UI#IPostBackDataHandler#RaisePostDataChangedEvent">
            <summary>
            Implements <see cref="M:System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent"/>.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.System#Web#UI#IPostBackDataHandler#LoadPostData(System.String,System.Collections.Specialized.NameValueCollection)">
            <summary>
            Implements <see cref="M:System.Web.UI.IPostBackDataHandler.LoadPostData(System.String,System.Collections.Specialized.NameValueCollection)"/>.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.loadNewItems(System.String,System.Collections.Specialized.NameValueCollection)">
            <summary>
            Edits the ListItems that were added or removed on the clientside
            </summary>
            <returns>True if the list of items has changed.</returns>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.RegisterClientScript">
            <summary>
            Registers all the client script for the DynamicListBox
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.RegisterLibraryScript">
            <summary>
            Registers the library script for the DynamicListBox
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.RegisterArrayScript">
            <summary>
            Register this DynamicListBox with the Page
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.RegisterStartupScript">
            <summary>
            Registers the DynamicListBox startup script
            </summary>
        </member>
        <member name="P:MetaBuilders.WebControls.DynamicListBox.Controls">
            <summary>
            Overridden to call EnsureChildControls.
            </summary>
            <remarks>Supposedly should be done for all controls which override CreateChildControls</remarks>
        </member>
        <member name="E:MetaBuilders.WebControls.DynamicListBox.ItemsChanged">
            <summary>
            The event that is raised when the user has changed the listbox's items collection..
            </summary>
        </member>
        <member name="T:MetaBuilders.WebControls.DynamicListBox.ListCommand">
            <summary>
            Represents a command stored on the clientside which alters the Items collection of the <see cref="T:MetaBuilders.WebControls.DynamicListBox"/>.
            </summary>
            <remarks>
            You don't need to use this in your code.
            </remarks>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.ListCommand.Parse(System.String)">
            <summary>
            Parses a single command string and returns the ListCommand created
            </summary>
            <param name="command">The string command to parse.</param>
            <returns>The created ListCommand</returns>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBox.ListCommand.Split(System.String)">
            <summary>
            Splits a full command string set into an array of ListCommands.
            </summary>
            <remarks>You don't need to use this from your code.</remarks>
            <param name="postedCommands">The set of commands to split.</param>
            <returns>The created array of ListCommands.</returns>
        </member>
        <member name="F:MetaBuilders.WebControls.DynamicListBox.ListCommand.Operator">
            <summary>
            Gets or sets the operator of the command. + or -.
            </summary>
        </member>
        <member name="F:MetaBuilders.WebControls.DynamicListBox.ListCommand.Text">
            <summary>
            Gets or sets the text of the added ListItem.
            </summary>
        </member>
        <member name="F:MetaBuilders.WebControls.DynamicListBox.ListCommand.Value">
            <summary>
            Gets or sets the value of the added ListItem.
            </summary>
        </member>
        <member name="F:MetaBuilders.WebControls.DynamicListBox.ListCommand.Index">
            <summary>
            Gets or sets the index of the ListItem to add or remove.
            </summary>
        </member>
        <member name="T:MetaBuilders.WebControls.DynamicListBoxResourceHandler">
            <summary>
            The DynamicListBoxResourceHandler takes care of script support for the controls in the assembly.
            It is not meant to be used by your code.
            </summary>
        </member>
        <member name="M:MetaBuilders.WebControls.DynamicListBoxResourceHandler.System#Web#IHttpHandler#ProcessRequest(System.Web.HttpContext)">
            <summary>
            Processes the request by emitting script embedded in the assembly.
            </summary>
            <param name="context"></param>
        </member>
    </members>
</doc>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -