none
Terminal Server - Accessing a ASP.net 2.0 page with GridView

    Question

  • I'm not sure where to go on this but I wrote a ASP.net page that retreives data from an sql data source into a gridview.  It works great - but if you try to access that same page from a terminal server client (Terminal Server 2003) it shows up but if you try to navigate to page 2 - nothing happens.  The asp page goes blank and it you view the source, there is nothing.  I am running Master pages and this is the code for the page.  I don't see any problems and yet this problem only effects those on terminal server.  I've rebooted the server, cleared the temp files and cache but I'm still lost as to why Terminal Server will not display the 2nd page of the gridview.

    <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Company_Site.Master" CodeBehind="Default.aspx.vb" Inherits="Company_Intranet._Default7"
        title="My Application" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
        <span style="color: #000099; font-family: Verdana">Welcome.<br />
        </span>
        <br />
        <span><span style="font-family: Verdana"><span style="font-size: 10pt">Search by Last Name:</span>&nbsp; </span>
            <asp:TextBox ID="txtSearch" runat="server" Font-Names="Verdana" TabIndex="1" Font-Size="10pt"></asp:TextBox><span
                style="font-family: Verdana">&nbsp;<span style="font-size: 10pt">and/or<br />
            Search by Address:</span> </span>
            <asp:TextBox ID="txtAddress" runat="server" Font-Names="Verdana" TabIndex="1" Width="176px" Font-Size="10pt"></asp:TextBox><span
                style="font-family: Verdana"> </span>
            <asp:Button
                ID="btnQuery" runat="server" Font-Bold="True" Font-Names="Verdana" TabIndex="2"
                Text="Query" Font-Size="10pt" /><br />
        </span><span style="font-size: 8pt; font-family: Verdana"><em>Note: % is wildcard character<br />
        </em></span>
        <br />
        <a href="Intake/Intake_Add.aspx"><span style="font-size: 10pt; font-family: Verdana">Add new
            consumer</span></a><br />
        <asp:GridView ID="gvConsumers" originalAttribute="href" originalPath="Intake/Intake_Add.aspx"><span style="font-size: 10pt; font-family: Verdana">Add new
            consumer</span></a><br />
        <asp:GridView ID="gvConsumers" runat="server" AllowSorting="True"
                AutoGenerateColumns="False" Caption="List Of Consumers" CaptionAlign="Top" CellPadding="4"
                DataKeyNames="Record_ID" DataSourceID="SqlDataSource1" Font-Names="Verdana" ForeColor="#333333"
                GridLines="None" PageSize="50" ToolTip="Select a consumer to access his/her records." TabIndex="3" Font-Bold="False" Font-Size="9pt" AllowPaging="True">
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Names="Verdana" Font-Size="9pt" />
                <RowStyle BackColor="#EFF3FB" Font-Names="Verdana" Font-Size="9pt" CssClass="gridCSS" />
                <Columns>
                    <asp:BoundField DataField="Record_ID" HeaderText="Record_ID" ReadOnly="True" SortExpression="Record_ID"
                        Visible="False" />
                    <asp:BoundField DataField="Consumer_ID" HeaderText="C-ID" SortExpression="Consumer_ID" />
                    <asp:BoundField DataField="Last_Name" HeaderText="Last Name" SortExpression="Last_Name" />
                    <asp:BoundField DataField="First_Name" HeaderText="First Name" SortExpression="First_Name" />
                    <asp:BoundField DataField="Address_Line_One" HeaderText="Address" SortExpression="Address_Line_One" />
                    <asp:BoundField DataField="Start_Date" HeaderText="Start Date" ReadOnly="True" SortExpression="Start_Date" DataFormatString="{0:MM-dd-yyyy}" HtmlEncode="False" />
                    <asp:BoundField DataField="End_Date" HeaderText="End Date" ReadOnly="True" SortExpression="End_Date" DataFormatString="{0:MM-dd-yyyy}" HtmlEncode="False" />
                    <asp:HyperLinkField DataNavigateUrlFields="Record_ID" DataNavigateUrlFormatString="~/Company_MH/Intake/Intake.aspx?ID={0}" Text="I" />
                </Columns>
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" Font-Names="Verdana" Font-Size="9pt" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Names="Verdana" Font-Size="10pt" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" CssClass="gridAlternateCSS" />
            </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Company_ConnectionString %>"
            SelectCommand="[Company].[dbo].[stpConsumers_Select_All_Active]" SelectCommandType="StoredProcedure" FilterExpression="(Last_Name Like '{0}') AND (Address_Line_One LIKE '{1}')">
            <FilterParameters>
                <asp:ControlParameter Name="Last_Name" ControlID="txtSearch" PropertyName="Text" Type="String" DefaultValue="%" />
                <asp:ControlParameter Name="Address_Line_One" ControlID="txtAddress" PropertyName="Text" Type="String" DefaultValue="%" />
            </FilterParameters>
        </asp:SqlDataSource>
    </asp:Content>

    Tuesday, March 17, 2009 7:21 PM

Answers

  • Hi,

    You might want to post this in the ASP.net forums: http://forums.asp.net/

    Terminal Server just displays what ever is rendered to the screen (in this case what the web browser displays). You might also want to check if this could be a user specific problem: i.e. what happens if the 'same user' who is logging on to the Terminal Server remotely tries to logon from the Console directly; i.e. do they still see the same problem.

    Thanks,
    Mauruthi. G
    • Marked as answer by ejc67 Monday, July 25, 2011 8:42 PM
    Tuesday, November 10, 2009 9:25 AM