[SOLVED] Double Postback issue
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
[SOLVED] Double Postback issue
Subscribe
Last Login: 6/21/2010 4:42:21 PM
Posts: 82,
Posted 1/13/2010 1:26:04 PM

Group: Coolite Premium Member & Early Adopter

Hello,

I have a simple ASPX page called using "Autoload" into a Panel control. This parent page passes a Querystring value to it. But for some reason it does a double Postback (not all the time). Is there something I need to do to prevent this.
Please see HTML and code-behind bellow.

Html



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpeakerExpertise.aspx.cs"
    Inherits="WebClientTrackerII.App.Speakers.SpeakerExpertise" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="scrptMgrSpeakerExpertise" runat="server" CleanResourceUrl="false"
        Theme="Gray" />
    <%-- ****** SQL Datasources ****** --%>
    <asp:SqlDataSource ID="SqlDataSourceSpkrExpertiseList" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
        ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" SelectCommand="SELECT   SPKR_EXPRTS.SPKR_EXPRTS_SPKR_ID,
                     SPKR_EXPRTS.SPKR_EXPRTS_EXPRTS_CTGRY_ID,
                     SPKR_EXPRTS.SPKR_EXPRTS_EXPRTS_SUBCTGRY_ID,
                     SPKR_LANG.SPKR_LANG_LANG_TYPE_ID,
                     SPKR_LANG.SPKR_LANG_PRMRY_IND
              FROM   TRACKER2.SPKR_EXPRTS, TRACKER2.SPKR_LANG
             WHERE   SPKR_EXPRTS.SPKR_EXPRTS_SPKR_ID = SPKR_LANG.SPKR_LANG_SPKR_ID
             AND (SPKR_EXPRTS.SPKR_EXPRTS_SPKR_ID = : SPKR_EXPRTS_SPKR_ID)">
        <SelectParameters>
            <asp:SessionParameter Name="SPKR_EXPRTS_SPKR_ID" SessionField="SpeakerIDSess" />
        </SelectParameters>
    </asp:SqlDataSource>
    <%-- ****** Store Objects ****** --%>
    <ext:Store ID="storeSpkExpertiseList" runat="server" AutoLoad="true" DataSourceID="SqlDataSourceSpkrExpertiseList">
        <Reader>
            <ext:JsonReader ReaderID="SPKR_EXPRTS_SPKR_ID">
                <Fields>
                    <ext:RecordField Name="SPKR_EXPRTS_SPKR_ID" />
                    <ext:RecordField Name="SPKR_EXPRTS_EXPRTS_CTGRY_ID" />
                    <ext:RecordField Name="SPKR_EXPRTS_EXPRTS_SUBCTGRY_ID" />
                    <ext:RecordField Name="SPKR_LANG_LANG_TYPE_ID" />
                    <ext:RecordField Name="SPKR_LANG_PRMRY_IND" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <%-- ****** Layout ****** --%>
    <ext:ViewPort ID="ViewPortSpeakerExpertise" runat="server">
        <Body>
            <ext:BorderLayout ID="BorderLayoutSpeakerExpertise" runat="server">
                <Center Split="true">
                    <ext:Panel ID="speakerCenterPnl" runat="server">
                        <Body>
                            <ext:FitLayout ID="speakerCenterFtly" runat="server">
                                <ext:GridPanel ID="grdPnlExpertise" runat="server" StoreID="storeSpkExpertiseList"
                                    Header="false" Frame="false" StripeRows="true">
                                    <ColumnModel ID="spkrExpertiseModel" runat="server">
                                        <Columns>
                                            <ext:Column DataIndex="SPKR_EXPRTS_EXPRTS_CTGRY_ID" Header="Category" Width="120">
                                            </ext:Column>
                                        </Columns>
                                    </ColumnModel>
                                </ext:GridPanel>
                            </ext:FitLayout>
                        </Body>
                    </ext:Panel>
                </Center>
                <South Split="true">
                    <ext:Panel ID="Panel1" runat="server">
                        <Body>
                        </Body>
                    </ext:Panel>
                </South>
            </ext:BorderLayout>
        </Body>
    </ext:ViewPort>
    </form>
</body>
</html>




Server-Side


using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Coolite.Ext.Web;
namespace WebClientTrackerII.App.Speakers
{
    public partial class SpeakerExpertise : WebClientTrackerII.App.Speakers.SpeakerController
    {
        protected string _userID = String.Empty;
        protected const string _ApplicationName = "TRACKER";
        private const string _ClassName = "Speaker Expertise";


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.IsAjaxRequest)
            {
               
                if (Request.QueryString["speakerid"] != null)
                {
                    this.SpeakerID = Request.QueryString["speakerid"].ToString();
                }
                else
                {
                    this.SpeakerID = string.Empty;
                }


                this.initPage();


            }
        }


        protected void initPage()
        {
            string test = this.SpeakerID;


            this.ShowMessage(_ClassName, "Speker ID is :" + test);
          
        }
    }
}




Any ideas will be appreciated.

Thank you,

Ernesto L Godoy

U.S Department of State IIP-ECA/IT/AP
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 1/13/2010 6:57:17 PM

Group: Core Development Team
Hi Ernesto,

I took a look through your sample, but I don't see what is doing the AutoLoad? or what is triggering the PostBack?

Does the issue still occur if you replace the GridPanel with a Panel?

More information required. 

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 1/15/2010 10:54:20 AM

Group: Core Development Team
Hi,

Just wondering if you have an update for us regarding this issue? complete code sample?

EDIT: Marking as [SOLVED] until more information or code-sample is provided by original poster. 

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 4:40pm