How to get params when page load

  1. #1

    How to get params when page load

    Hello all,

    I have a TabPanel and have addTab funtion to add a new tab. The addTab funtion is the below:
    var addTab = function(tabPanel, id, url, title, params) {
                var tab = tabPanel.getComponent(id);
                
                if (!tab) {
                    tab = tabPanel.add({
                        id: id,
                        title: title,
                        closable: true,
                        autoLoad: {
                            showMask: true,
                            url: url,
                            params: params,
                            mode: "iframe",
                            maskMsg: "Đang tải trang " + title.toUpperCase() + "..."
                        }
                    });
                }
    
                tabPanel.setActiveTab(tab);
            }
    and i using this code to load A.aspx page:

    addTab(tabPanelMain, 'idATab', 'A.aspx', 'Page A', {id: 1})
    My problem is: i don't know to get the params value at when A.aspx loading.

    Thansks for any reply or give me any refference.
    Huy
  2. #2
    Hi,

    Params are passed in the query string
    this.Page.Request.QueryString["paramName"]
  3. #3
    Quote Originally Posted by vladimir View Post
    Hi,

    Params are passed in the query string
    this.Page.Request.QueryString["paramName"]
    Hi Vlad,

    Thanks for your reply, but my actual problem is:

    I have a TabPanel on the detail.aspx?i=1 page as following:

    
    <ext:TabPanel ID="tabPanelGeneralInfo" runat="server" ActiveTabIndex="0">
                                            <Items>
                                                <ext:Panel ID="Panel7" runat="server" Title="<%$ Resources:FormLabel, HRM_Personal_PersonalDetailForm_Title%>" Padding="0">
    <AutoLoad Url="Child.aspx" Mode="IFrame" ShowMask="true" />                                                                              
                                                </ext:Panel>
                                            </Items>
                                        </ext:TabPanel>

    I want to pass the "i" query string from detail.aspx page to the child.aspx page. But i haven't any idea to resolve it by use html declare. Finally, i have to use the code behind:

    protected void Page_Load(object sender, EventArgs e)
            {
                if (!ExtNet.IsAjaxRequest)
                {
                    ConfigPanelAutoLoad(Panel7, "./child.aspx", Constants.QueryString.RECORD_ID,
                                        Request.QueryString[Constants.QueryString.RECORD_ID]);                
                }
            }
    
    
    protected void ConfigPanelAutoLoad(Panel panel, string url, params object[] objects)
            {
                panel.AutoLoad.Url = string.Format(url + "?" + CommonFunction.GetQueryString(objects));
                panel.AutoLoad.NoCache = true;
                panel.AutoLoad.Mode = LoadMode.IFrame;
                panel.AutoLoad.ShowMask = true;
            }
    Please give me any discussion or mark this post is CLOSED for me!

    Thanks,

Similar Threads

  1. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM
  2. [CLOSED] Stop treepanel to load data on page load
    By inayath in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 11, 2011, 10:17 AM
  3. how to load data to grid panel in page load
    By andylaiyongsing in forum 1.x Help
    Replies: 1
    Last Post: Apr 16, 2010, 10:27 AM
  4. Renderer with link - load params for store
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Aug 14, 2009, 12:51 PM
  5. Modify store load params clientside
    By jchau in forum 1.x Help
    Replies: 14
    Last Post: Aug 10, 2009, 10:41 AM

Posting Permissions