Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 02, 2012 10:06 AM by tusharrs
Apr 30, 2012 12:24 PM|LINK
I am a Software Trainee in asp.net (C# ).
In my asp page ,on a click of linkbutton ,I am showing a text message at the bottom of page in
But problem is that ,if any unknown user comes and click on linkbutton ,he feels that there is no action on that click ok Linkbutton.
So I need to scroll the page at the bottom of page OR on click of linkbutton it should goes to that div (where msg is shown) .
If possible ,please tell me solution of code behind because text message is assigned is code behind.
Thanks in advance.
Apr 30, 2012 12:31 PM|LINK
Apr 30, 2012 12:36 PM|LINK
<a href="#divname" onClick="Function()">ClickMe</a>
Hope this helps!
Apr 30, 2012 12:43 PM|LINK
a anchor tag and div element where you want to display the message
the bottom use div to display the message
May 01, 2012 05:49 AM|LINK
You can use Focus() method of the message to set focus. But honestly, I do not think your page UI layout is good. If some message is shown as a result of a button click, it should be adjacent to the button. Do not show the message some where else. It does
not make a good layout anyway.
Please 'Mark as Answer' if this post helps you.
May 02, 2012 05:05 AM|LINK
I had tried this,but the problem is that page scrolls down for a few seconds and goes up ,It should stay at that position .
Also this solution works in some browser ie Firefox and IE, ,it does not work in Chrome and Safari.
May 02, 2012 05:20 AM|LINK
I agree to U Ruchira.Actually situation is that on click of Linkbutton a Rich textbox is inserted on page and that link button is at the top of page (just like forum ).Rich text box is in Div
May 02, 2012 08:37 AM|LINK
Call that function when you need. If you need it to scroll to the bottom after your postback is done, you can use the below to register that method so it will run right after the post back finishes.
Or try by setting the focus at client side. Like below
May 02, 2012 09:08 AM|LINK
If you want to scroll to bottom of the div, try below :
i.e divFavorDet is your div name.
May 02, 2012 09:38 AM|LINK
You can try with this.I tested it IE and Mozilla.
<a href="#divMsg">Click Here to Scroll</a>
<div id = "divMsg">
This is the message