Click here to Skip to main content
15,894,646 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionsend message Pin
Rinki Mukheraji18-Nov-08 18:03
Rinki Mukheraji18-Nov-08 18:03 
AnswerRe: send message Pin
Parwej Ahamad18-Nov-08 18:31
professionalParwej Ahamad18-Nov-08 18:31 
AnswerRe: send message Pin
Brij18-Nov-08 18:38
mentorBrij18-Nov-08 18:38 
AnswerRe: send message Pin
Anil Pandey18-Nov-08 19:35
Anil Pandey18-Nov-08 19:35 
QuestionMenu Control is responding slowly in IE7 but working fine in FireFox Pin
sarangpani18-Nov-08 17:57
sarangpani18-Nov-08 17:57 
Questionselect button in gridview to populate textbox controls in new form (using linq to sql) Pin
Member 141625418-Nov-08 14:11
Member 141625418-Nov-08 14:11 
Questionmy detailsview dissappears Pin
learningman18-Nov-08 10:30
learningman18-Nov-08 10:30 
QuestionScroll panel to bottom Pin
jzonthemtn18-Nov-08 8:04
jzonthemtn18-Nov-08 8:04 
Hi all,

I have a literal inside of a panel as such:

<asp:panel scrollbars="Vertical" id="Panel1" runat="server" xmlns:asp="#unknown"><asp:literal id="Literal1" runat="server" /></asp:panel>

I am setting the literal to be some HTML text. The literal grows, the panel's scrollbars show up, everything is great. I'm using the following code to maintain the position of the panel's scrollbar during postback:

<script type="text/javascript">

    var xPos, yPos;
    var prm = Sys.WebForms.PageRequestManager.getInstance();

    function BeginRequestHandler(sender, args) {

        if ($get('<%= Panel1.ClientID %>') != null) {

            xPos = $get('<%= Panel1.ClientID %>').scrollLeft;
            yPos = $get('<%= Panel1.ClientID %>').scrollTop;

        }

    }

    function EndRequestHandler(sender, args) {

        if ($get('<%= Panel1.ClientID %>') != null) {

            $get('<%= Panel1.ClientID %>').scrollleft = xPos;
            $get('<%= Panel1.ClientID %>').scrollTop = yPos;

        }

    }

    prm.add_beginRequest(BeginRequestHandler);
    prm.add_endRequest(EndRequestHandler);
    

</script>

That works great, too. Now for the problem: When the user has the panel scrolled all the way to the bottom, they can't see the newly added text to the Literal without scrolling the panel down. Is there a way that I can automatically scroll the panel down? Ideally, I want to automatically scroll the panel if the scroll position is near the bottom. (If the scroll position is near the top I don't want to scroll because they might be trying to read something and that's annoying to keep going back and forth.)

Thanks everyone Smile | :)
AnswerRe: Scroll panel to bottom Pin
jzonthemtn18-Nov-08 8:27
jzonthemtn18-Nov-08 8:27 
AnswerRe: Scroll panel to bottom Pin
Christian Graus18-Nov-08 9:04
protectorChristian Graus18-Nov-08 9:04 
GeneralRe: Scroll panel to bottom Pin
jzonthemtn18-Nov-08 11:13
jzonthemtn18-Nov-08 11:13 
GeneralRe: Scroll panel to bottom Pin
Christian Graus18-Nov-08 11:46
protectorChristian Graus18-Nov-08 11:46 
GeneralRe: Scroll panel to bottom Pin
jzonthemtn18-Nov-08 11:54
jzonthemtn18-Nov-08 11:54 
QuestionCheckBoxList and PostBack Pin
Ahmed Galal18-Nov-08 7:26
Ahmed Galal18-Nov-08 7:26 
AnswerRe: CheckBoxList and PostBack Pin
ToddHileHoffer18-Nov-08 7:41
ToddHileHoffer18-Nov-08 7:41 
GeneralRe: CheckBoxList and PostBack Pin
Ahmed Galal18-Nov-08 9:25
Ahmed Galal18-Nov-08 9:25 
GeneralRe: CheckBoxList and PostBack Pin
ToddHileHoffer18-Nov-08 10:06
ToddHileHoffer18-Nov-08 10:06 
GeneralRe: CheckBoxList and PostBack Pin
Ahmed Galal19-Nov-08 5:54
Ahmed Galal19-Nov-08 5:54 
QuestionDataReader used type of function and closed when tried to call after RETURN(C#/VS 2005) Pin
Davidv12318-Nov-08 6:23
Davidv12318-Nov-08 6:23 
AnswerRe: DataReader used type of function and closed when tried to call after RETURN(C#/VS 2005) Pin
Ennis Ray Lynch, Jr.18-Nov-08 7:32
Ennis Ray Lynch, Jr.18-Nov-08 7:32 
QuestionMultiview and Radiobuttonlist problem in updatePanel Pin
sawssinette18-Nov-08 5:43
sawssinette18-Nov-08 5:43 
AnswerRe: Multiview and Radiobuttonlist problem in updatePanel Pin
ToddHileHoffer18-Nov-08 7:51
ToddHileHoffer18-Nov-08 7:51 
AnswerRe: Multiview and Radiobuttonlist problem in updatePanel Pin
sawssinette18-Nov-08 22:34
sawssinette18-Nov-08 22:34 
GeneralRe: Multiview and Radiobuttonlist problem in updatePanel Pin
ToddHileHoffer19-Nov-08 2:05
ToddHileHoffer19-Nov-08 2:05 
QuestionConvert rdlc to PDF without using LocalReport.Render method PinPopular
Member 183766118-Nov-08 5:14
Member 183766118-Nov-08 5:14 

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.