Custom function in User Controls

  1. #1

    Custom function in User Controls


    hi

    is custom functions dnt work on ascx pages.... as i have used n it shows following error

    "The
    resource you are looking for (or one of its dependencies) could have
    been removed, had its name changed, or is temporarily unavailable"

    if not then what alternative????

    my prob is that i want to open up a page in a tab on the bases of selection of radio button from another tab..... i have tried ajaxevent too in which i set the url throught AutoLoad property but it dsnt work as well

    I m doing all this is a UserControl(apcx)

    what is appropraite solution ?

    plz help

    thanx
  2. #2

    RE: Custom function in User Controls

    Please post simplified .aspx code sample demonstrating how to reproduce the scenario you describe.*

    Geoffrey McGill
    Founder
  3. #3

    RE: Custom function in User Controls

    rite

    this is what i have tried with AjaxEvent


    cmp.ascx
    //opening tabs from the tree nodes
    
    
    <ext:TreeNode Text="Template Selection" NodeID="node1" >
       <Listeners>
       <Click Handler="#{CMP_Creation}.addTab(#{Template});" />
       </Listeners>
       </ext:TreeNode>
    <ext:TreeNode Text="Layout" NodeID="node4">
       <Listeners>
       <Click Handler="#{CMP_Creation}.addTab(#{Layout});"/>
       </Listeners>
    
     <ext:TabPanel ID="Invisible" runat="server" Hidden="true">
       <Tabs>
       <ext:Tab ID="Template" runat="server" Title="Templates" Closable="true" AutoScroll="true">
       <Body>  
       <ext:Panel ID="check" runat="server" ButtonAlign="Right">
       <Body>
       <ext:FieldSet ID="fieldset" runat="server" Title="Use Template">
           <Body>
           <ext:RadioGroup ID="tmplt_select" runat="server" >                 
           <Items>
           <ext:Radio ID="Default" runat="server" BoxLabel="Default" Checked="true">   
           </ext:Radio>
           <ext:Radio ID="custom" runat="server" BoxLabel="Custom">
            </ext:Radio>
            </Items>
             </ext:RadioGroup>
             </Body>
       </ext:FieldSet>     
       </Body>
       </ext:Panel>
       </Body>
       </ext:Tab> 
        <ext:Tab ID="Layout" runat="server" Title=" Layout" Closable="true">
       <AjaxEvents>
       <Show OnEvent="OpenLayout"></Show>
       </AjaxEvents>   
       </ext:Tab>
    cmp.ascx.cs
    
     protected void OpenLayout(object sender, AjaxEventArgs e)
        {
            if (Default.Checked == true)
            {
                Layout.AutoLoad.Url="Default.html";
            }
            else
            {
                 //open some other page
            }
            
        }
    and this is what i have tried with Custom function

    <script type="text/javascript">
        var getUrl = function()
        {
            return "Default.aspx";
        };
    </script>
    
     <AutoLoad Url="={getUrl()}" />
    and it shows the following error
    "The resource you are looking for (or one of its dependencies) could have

    been removed, had its name changed, or is temporarily unavailable"


    thnx

Similar Threads

  1. Replies: 1
    Last Post: Jul 20, 2012, 8:08 AM
  2. [CLOSED] How should I nested ext.net.controls with user controls?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 04, 2012, 11:14 AM
  3. Replies: 5
    Last Post: Nov 03, 2011, 2:39 AM
  4. Replies: 4
    Last Post: May 31, 2011, 11:54 AM
  5. Replies: 3
    Last Post: Apr 08, 2010, 5:28 PM

Posting Permissions