Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Show specific section of the page.

After selecting the submit button,
Id like the page to display the lower part of page,meaning force it to scroll to the area so that the user can view the grid where the info he entered are listed instead of displaying the upper portion of the page.
0
zachvaldez
Asked:
zachvaldez
  • 8
  • 4
1 Solution
 
zachvaldezAuthor Commented:
OK, I added this to the page

 MaintainScrollPositionOnPostback="true" which works fine ;however

I have a button that I click for initiating another data entry.
Id like it to jump in the 'Last Name' textbox but it does not go there using the code

Txtlastname.focus.  I think it is because of the line I added in the page directive.

Any suggestion to fix this. Thanks for the link. I'll check it out.

0
 
leakim971PluritechnicianCommented:
put this in your page :

<script>
window.onload = function() {
       setTimeout(function() { document.getElementById("<%= Txtlastname.ClientID %>").focus(); }, 500);
}
</script>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
zachvaldezAuthor Commented:
OK , I could not follow the anchor tutorial, thanks
so Im posting the  part of the HTML code . where will the anchor go?
<tr>
            <td bgcolor="#FFFFCC" class="style20" colspan="2">
                &nbsp;
            </td>
            <td align="left" class="style21" bgcolor="#FFFFCC" colspan="6">
                <asp:Label ID="Label44" runat="server" Font-Bold="True">Person Information</asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style20" colspan="2">
                <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Small">Last Name:</asp:Label>
            </td>
            <td align="left" class="style21" colspan="6">
                <%--  <asp:Label ID="Label7" runat="server" Width="296px"></asp:Label>--%>
                <asp:TextBox ID="TextBox12" runat="server" Width="381px" CssClass="cap" Onkeypress="return lettersOnly(event)"
                    Font-Names="Microsoft Sans Serif" BorderStyle="None" Font-Size="Small"></asp:TextBox>
               
            </td>
            <td style="border-style: none; border-color: #FFFFFF; font-style: italic; font-weight: normal;
                color: #FF0000;" align="left" class="style11">
                <asp:Label ID="Label88" runat="server" Font-Bold="True" Font-Size="Larger" Text="*"></asp:Label>
            </td>
        </tr>
0
 
zachvaldezAuthor Commented:
how will I use the script that you made. which part of the source Ill add it.
0
 
leakim971PluritechnicianCommented:
>how will I use the script that you made.
put it in your page

>which part of the source Ill add it.
all
0
 
zachvaldezAuthor Commented:
at the Person Information
0
 
leakim971PluritechnicianCommented:
?
0
 
zachvaldezAuthor Commented:
>>>>window.onload = function() {
       setTimeout(function() { document.getElementById("<%= Txtlastname.ClientID %>").focus(); }, 500);
}

I dont think this would work because every postback it goes to focus on the txtlastname field.

What probably would work is the anchor then focus to the field
when the button 'Add another member"
0
 
zachvaldezAuthor Commented:
whats the ? all about??
0
 
zachvaldezAuthor Commented:
here's the button

 <asp:LinkButton ID="LinkButton3" runat="server">Add Another Person?</asp:LinkButton>

wish lis that teh page would move lower so the txtbox would be in focus
0
 
zachvaldezAuthor Commented:
Thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now