#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    3
    Rep Power
    0

    Asp.Net and the single file model, update panel


    Hi,

    I have used the control kit without any problems on the 2 file model.

    I am currently having to work with someone that started a project in the single file model. I am wanting to use some of the same functionality that I have used in the 2 file model but it is doing a full postback.

    <asp:UpdatePanel ID="upGridIssues" runat="server">
    <Triggers>
    </Triggers>
    <ContentTemplate>
    <aspropDownList ID="ddlGameIssueTypes" runat="server"
    OnSelectedIndexChanged="ddlGameIssueTypes_SelectedIndexChanged"
    AutoPostBack="True">
    <asp:ListItem Selected="True">Select Issue Type</asp:ListItem>
    <asp:ListItem>Account Issue</asp:ListItem>
    <asp:ListItem>Functionality</asp:ListItem>
    <asp:ListItem>Game Glitch</asp:ListItem>
    <asp:ListItem>Page Error</asp:ListItem>
    <asp:ListItem>Suggestion</asp:ListItem>
    </aspropDownList>
    <asp:GridView ID="gvIssues" runat="server" HeaderStyle-CssClass="HeaderStyle" RowStyle-CssClass="RowStyle"
    AlternatingRowStyle-CssClass="AltRowStyle" EditRowStyle-CssClass="EditRowStyle"
    PagerStyle-CssClass="PagerStyle" AllowPaging="True" AllowSorting="False" AutoGenerateColumns="false"
    CssClass="GridViewStyle" GridLines="Horizontal" PageSize="20">
    <Columns>
    <asp:CommandField ShowSelectButton="true" SelectText="Edit" />
    <asp:BoundField DataField="Message" HeaderText="Message" SortExpression="Message">
    <ItemStyle Width="650px" />
    </asp:BoundField>
    <asp:BoundField DataField="User" HeaderText="User" SortExpression="User">
    <ItemStyle Width="200px" />
    </asp:BoundField>
    <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date">
    <ItemStyle Width="150px" />
    </asp:BoundField>
    <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status">
    <ItemStyle Width="75px" />
    </asp:BoundField>
    </Columns>
    </asp:GridView>
    </ContentTemplate>
    </asp:UpdatePanel>

    No matter what i can not get the single file model to do this asynchronously, it always reloads the page fully.

    Is it possible to do it in the single file model or am I doing something wrong?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    Pretty sure you can mix-and-match single file model with 2 file model stuff. That is simply driven off the .aspx file header.

    Just put your 2 file model code in there, it should work.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    3
    Rep Power
    0
    I should have mentioned that.

    I do have the function in there for selected index changed.

    When I use it in 2 file model it just updates my grid but when the selected index changed gets hit in single file model it does the full postback.

IMN logo majestic logo threadwatch logo seochat tools logo