The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

UserControlLoader handling events define in User Control

Page 2 of 2 FirstFirst 12
  1. #11
    So, I am getting the same thing, you click on the menu item and you get a thin line which I am assuming is the rendered control. Something is squashing it down... let me figure it out...
  2. #12
    Ok, take out the RenderToForm="true" from the menu item and it displays. So here is the code from a blank project. This shows the original problem of not being able to select the combo in the control, but has the event wired up, which I can not seem to do using the Control Loader.

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="ControlLoaderMain.aspx.vb" Inherits="ControlLoaderMain" %>
    <%@ Register TagPrefix="uc" TagName="QuickSearch" Src="~/ControlLoaderControl.ascx" %>
    <!DOCTYPE html>
    <html xmlns="">
    <head runat="server">
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager" runat="server" />
        <ext:Window ID="Window1" runat="server" Visible="true" Maximized="true" Padding="5" Resizable="true" MinHeight="700" MinWidth="500" Closable="false">
                <ext:Toolbar ID="Toolbar1" runat="server">
                        <ext:Button ID="QuickLaunchReport" runat="server" Text="This does not work" >
                                <ext:Menu ID="QuickLaunchReportMenu" runat="server"  Width="450" ShowSeparator="false">
                                        <ext:Panel runat="server" Height="50" Border="true">
                                                <uc:QuickSearch ID="QuickSearch" runat="server" />
    Partial Class ControlLoaderMain
        Inherits System.Web.UI.Page
        Private Sub QuickSearch_Selected(sender As Object, e As ControlLoaderControl.QuickSearchEventArgs) Handles QuickSearch.Selected
        End Sub
    End Class
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ControlLoaderControl.ascx.vb" Inherits="ControlLoaderControl" %>
    <ext:Panel ID="outControl" runat="server" Height="100" Layout="FitLayout">
                    FieldLabel="Select a single item"
                    TypeAhead="true"        >
                    <ext:Store ID="Store1" runat="server">
                            <ext:Model runat="server" IDProperty="Value">
                                    <ext:ModelField Name="Text" />
                                    <ext:ModelField Name="Value" />
                    <ext:ListItem Text="TestingText1" Value="1" />
                    <ext:ListItem Text="Text" Value="2" />
                    <ext:ListItem Text="Text3" Value="3" />
                    <Select OnEvent="Results_Select">
                        <EventMask ShowMask="true" Target="Page" />
                            <ext:Parameter Name="Key" Value="testing" Mode="Raw" />
    Partial Class ControlLoaderControl
        Inherits System.Web.UI.UserControl
        Public Event Selected As EventHandler
        Public Class QuickSearchEventArgs
            Inherits Ext.Net.DirectEventArgs
            Public SelectedEntity As String
            Public Sub New(extraParams As Ext.Net.ParameterCollection)
            End Sub
        End Class
        Public Sub Results_Select(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs)
            Dim params As New Ext.Net.ParameterCollection()
            params.Add(New Ext.Net.Parameter("SameWindow", True))
            Dim args As New QuickSearchEventArgs(params) With {
                        .SelectedEntity = "x"
            RaiseEvent Selected(Me, args)
        End Sub
    End Class
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Code behind content handling (from client events)
    By fabricio.murta in forum 2.x Help
    Replies: 5
    Last Post: Oct 22, 2014, 7:26 AM
  2. Replies: 1
    Last Post: Sep 28, 2014, 8:36 AM
  3. Replies: 3
    Last Post: Sep 05, 2013, 9:18 AM
  4. Replies: 1
    Last Post: Jan 28, 2013, 6:26 AM
  5. [CLOSED] Direct events in user control
    By tiramisu in forum 1.x Premium Help
    Replies: 8
    Last Post: Dec 13, 2010, 12:34 PM

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.