Click here to Skip to main content
15,888,160 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: online payment Pin
jkirkerx17-Aug-12 19:27
professionaljkirkerx17-Aug-12 19:27 
AnswerRe: online payment Pin
Rahul Rajat Singh17-Aug-12 19:37
professionalRahul Rajat Singh17-Aug-12 19:37 
GeneralRe: online payment Pin
jkirkerx17-Aug-12 20:43
professionaljkirkerx17-Aug-12 20:43 
QuestionHow to create Shipment project container planning using ASP.NET Pin
SubiyaPalanisamy16-Aug-12 1:22
SubiyaPalanisamy16-Aug-12 1:22 
AnswerRe: How to create Shipment project container planning using ASP.NET Pin
ashjassi16-Aug-12 1:30
ashjassi16-Aug-12 1:30 
QuestionCascading dropdown selected value Pin
nitin_ion15-Aug-12 23:05
nitin_ion15-Aug-12 23:05 
AnswerRe: Cascading dropdown selected value Pin
Rahul Rajat Singh16-Aug-12 18:14
professionalRahul Rajat Singh16-Aug-12 18:14 
Questionmaintain scrollbar position Pin
sc steinhayse15-Aug-12 11:55
sc steinhayse15-Aug-12 11:55 
In a C# 2010 web form application, I want to maintain the scroll bar position in Panel1 listeb below. According to the following
link: http://gnidesign.blogspot.com/2011/06/how-to-maintain-page-scroll-on-postback.html, the javascript code that I supplied below
should work. My problem is there is not a 'head' html tag for me to embed the javascript code into.

Thus can you tell me what is wrong with the Javascript code I have below? Do I have the code in the wrong postion of the *.aspx
page?
Can you tell me how to maintain the scrollbar position of panel1?

Here is the code I am referring to:
<%@ Page Title="" Language="C#" MasterPageFile="~/App.Master" AutoEventWireup="true" MaintainScrollPositionOnPostback="true"
    CodeBehind="Atts.aspx.cs" Inherits="RpcSupport.Atts" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TopMenu" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ReportForm" runat="server">
   <ajx:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true">
    </ajx:ToolkitScriptManager>
    <asp:UpdatePanel ID="AttUploadUpdatePanel" runat="server">
        <ContentTemplate>  
            <table style="width: 100%;">
                <tr>
                    <td>
                        <table style="width: 50%;">
                            <tr>
                                <td width="100px" rowspan="5">
                                </td>
                            </tr>
                        </table>
                    </td>
                    <asp:Table ID="uploadAtttb" runat="server" Height="35px" HorizontalAlign="Center"
                        Width="50%">
                        <asp:TableRow ID="trTitle" runat="server" HorizontalAlign="Center">
                            <asp:TableCell ID="TableCell1" runat="server" RowSpan="1" ColumnSpan="5" VerticalAlign="Top" HorizontalAlign="Center">
                                <asp:Label ID="Label1" runat="server" CssClass="RptPageTitle" Text="Att Entry" />
                            </asp:TableCell></asp:TableRow><asp:TableRow ID="TableRow1" runat="server">
                            <asp:TableCell ID="TableCell2" runat="server" RowSpan="1" ColumnSpan="5" VerticalAlign="Top" HorizontalAlign="Center">
                                <asp:Label ID="lblResultMsg" runat="server" CssClass="msgStyle" />
                                <asp:Label ID="lblErrorMsg" runat="server" CssClass="errorStyle" />
                            </asp:TableCell></asp:TableRow><asp:TableRow ID="TableRow2" runat="server">
                            <asp:TableCell ID="TableCell3" runat="server" HorizontalAlign="Right">
                                <asp:Label ID="Lable2" runat="server" Text="Org Name" CssClass="RptFormLabel" />
                            </asp:TableCell><asp:TableCell ID="TableCell4" runat="server" HorizontalAlign="Left" AutoPostBack="true">
                                <asp:TextBox ID="txtOrgID" Visible="false" Enabled="true" runat="server" Width="100"
                                    MaxLength="10" />
                                <asp:TextBox ID="txtOrgName" runat="server" Width="250" CssClass="TextBoxStyle" OnTextChanged="FindOrg"
                                    AutoPostBack="true" MaxLength="100" /> 
                            <ajx:AutoCompleteExtender ID="AutoCompleteAtt" runat="server" CompletionListCssClass="AjaxListStyle"
                                    TargetControlID="txtOrgName" ServiceMethod="GetOrgAttList" ServicePath="Atts.aspx"
                                    MinimumPrefixLength="1" CompletionInterval="200" CompletionSetCount="50">
                                </ajx:AutoCompleteExtender>   
                            </asp:TableCell></asp:TableRow><asp:TableRow ID="TableRowa" runat="server" Visible="true">
                        </asp:TableRow>
                        <asp:TableRow ID="TableRowb" runat="server" Visible="true">
                            <asp:TableCell ID="TableCell5" runat="server" HorizontalAlign="right">
                            </asp:TableCell><asp:TableCell ID="TableCell5a" runat="server" HorizontalAlign="left">
                                <asp:Panel ID="Panel2" runat="server" CssClass="TextBoxStyle" GroupingText="Compoany Number and Name">
                                    <asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Height="130px" Width="455" 
                                        CssClass="TextBoxStyle">
                                        <asp:CheckBoxList ID="ChkBoxLstPlan" runat="server" >
                                        </asp:CheckBoxList>
                                    </asp:Panel>
                                </asp:Panel>
                            
                               <div>
                                    <asp:RequiredFieldValidator CssClass="errorStyle" ID="reqVal1" Display="Dynamic"
                                        runat="server" ControlToValidate="txtOrgName" ErrorMessage="'Organization Name' is a required field." />
                                </div>
                                
                            </asp:TableCell></asp:TableRow></asp:Table></tr></table></ContentTemplate>
                       </asp:UpdatePanel></asp:Content><asp:Content ID="Content5" ContentPlaceHolderID="ReportBody" runat="server">
<script type="text/javascript">
    window.scrollTo = function () { }
</script>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Footer" runat="server">
</asp:Content> 

AnswerRe: maintain scrollbar position Pin
jkirkerx15-Aug-12 17:44
professionaljkirkerx15-Aug-12 17:44 
GeneralRe: maintain scrollbar position Pin
sc steinhayse16-Aug-12 3:46
sc steinhayse16-Aug-12 3:46 
GeneralRe: maintain scrollbar position Pin
jkirkerx16-Aug-12 9:13
professionaljkirkerx16-Aug-12 9:13 
Questionregular expression validator Pin
sc steinhayse15-Aug-12 10:02
sc steinhayse15-Aug-12 10:02 
AnswerMessage Closed Pin
15-Aug-12 10:24
Susan Rich15-Aug-12 10:24 
GeneralRe: regular expression validator Pin
sc steinhayse15-Aug-12 11:57
sc steinhayse15-Aug-12 11:57 
Questionbring footer to bottom Pin
Jassim Rahma15-Aug-12 9:00
Jassim Rahma15-Aug-12 9:00 
QuestionASP.Net Routing by routes.MapPageRoute with routeURL and physicalFile is not available in route registration Pin
milad137715-Aug-12 7:14
milad137715-Aug-12 7:14 
AnswerRe: ASP.Net Routing by routes.MapPageRoute with routeURL and physicalFile is not available in route registration Pin
jkirkerx15-Aug-12 8:15
professionaljkirkerx15-Aug-12 8:15 
QuestionASP.Net 4 Routing with runtime routeURL and physicalFile Pin
milad137715-Aug-12 6:51
milad137715-Aug-12 6:51 
QuestionSending SMS through ASP.NET Pin
komalridda14-Aug-12 20:00
komalridda14-Aug-12 20:00 
AnswerRe: Sending SMS through ASP.NET Pin
StianSandberg14-Aug-12 21:05
StianSandberg14-Aug-12 21:05 
AnswerRe: Sending SMS through ASP.NET Pin
Richard MacCutchan14-Aug-12 21:10
mveRichard MacCutchan14-Aug-12 21:10 
GeneralRe: Sending SMS through ASP.NET Pin
RichardGrimmer5-Sep-12 4:36
RichardGrimmer5-Sep-12 4:36 
GeneralRe: Sending SMS through ASP.NET Pin
Richard MacCutchan5-Sep-12 5:18
mveRichard MacCutchan5-Sep-12 5:18 
AnswerRe: Sending SMS through ASP.NET Pin
Rahul Rajat Singh16-Aug-12 18:17
professionalRahul Rajat Singh16-Aug-12 18:17 
AnswerRe: Sending SMS through ASP.NET Pin
ashjassi17-Aug-12 2:41
ashjassi17-Aug-12 2:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.