.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to stop Horizontal Scroll bar on Panel?

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net

I have a panel on a pretty basic C# page.  I've set the height, and width, and set thescrollbars = "Vertical".  However, on some pages, the panel adds a horizonal scroll bar.  It seems very random, and I can't figure out why or how to prevent the panel from adding horizontal scroll bars.   The content in the panel is dynamic from a sql database, and I use a Repeater to display the returned sql. 

 Here is my code from my page for the panel.  Did I forget something????


View Complete Post

More Related Resource Links

How to remove the horizontal scroll bar from a TextBox on web form

HiHow to remove the horizontal scroll bar from a TextBox on web form.I am using IE8.0<asp:TextBox ID="TextBox1" runat="server" Width="99%" Height="250" Wrap="False" TextMode="MultiLine" ReadOnly="True"></asp:TextBox>The horizontal scroll bar is always visible weather there is text or not, in a disabled mode.And the vertical scrollbar of textbox flickers when I am moving my mouse cursor over anchor tag <a />. For textarea control the scroll bar automatically goes up. I am hiding and showing a div tag on click of anchor tag.Thanksgsalunkhe

Making a scrollable panel scroll with mousewheel just by hovering mouse

Hi, I have a particular problem with a possible solution and I am interested in hearing peoples opinions if it is the right way to go about it (or not  ) Some applications I have come across, such as Firefox, will allow the user to scroll the document window just by hovering the mouse over the display area and using the mouse wheel. You don't have to focus / select the display area first. With Firefox, the address bar can have the focus and the keyboard input but you can still scroll the document. Contrasting with IE and Visual Studio, you have to click into the document area before it responds to mouse wheel messages. In my winforms app, I have a tab control with several scrollable tabpages as well as scrollable panels in other places. Some of these just display data and don't have controls that can be focused or tabbed into. I would like to emulate the firefox behaviour described above. What I have done is created a class, ScrollPanelMessageFilter, that implementes System.Windows.Forms.IMessageFilter and that takes a Panel as it constructor parameter. It detects the mouse wheel when the cursor is over the display area and sends the message to the panel: using System;using System.Collections.Generic;using System.Diagnostics;using System.Drawing;using System.Text;using System.Runtime.InteropServices;using System.Windows.Forms;namespace MouseWheelTest{   

How to stop Sharepoint Top Link Bar Scrolling when you scroll down vertically

I have a lot of TAB on my main sharepoint page, and when I scroll down vertically, this Top Link Bar go up and disappear from the screen, what I would like to do is this top link bar still remain the same all the time and only some others contents scroll up and down using vertical scroll bar. Could any one help me , how to do this. Thanks David

Stop panel from repainting

Hi, i am learning Visual C# with Visual C# Express and i have a little problem.... i have a panel with accordion control in it that i made it, the panel AutoScroll property is set to true,

the problem is that in the moment of showing and hiding elements in the accordion (which is done in one method so no latency can happen between showing and hiding) the panel repaints itself and i have a little bit of flickering in the panel and the panels scroll bar so i was wondering, is there anything i can do to stop the panel from repaining untill i show/hide elements in the accordion and then enable repaining again?  Or is there any other solution?

Thanks in advance.

Maintain Scroll position on postback in a asp:panel?


Hi, I'm having a lot of trouble figuring this out. I'm unable to hold the scroll position in the postback in a panel that I set up with a gridview. I tried some of the links offered in the previous threads and it still doesn't seem to be working. Here's the code I have so far, maybe I am missing something small.

<asp:Panel runat="server" ScrollBars="Vertical" 
                 scrollPOS="<%=saveScrollPos.value %>"
                 style="BEHAVIOR: url(<%=ResolveURL('../Includes/ScrollPos.htc')%>); WIDTH: 4000px; HEIGHT: 1000px" >
                 <input id="saveScrollPos" type="hidden" runat="server" name="saveScrollPos"/>
                   <asp:MultiView ID="MultiView1" runat="server">
                    <asp:View ID="View1" runat="server">


Here is the behavior file It points to:

<PUBLIC:ATTACH EVENT=ondocumentready ONEVENT="elementLoad()" />

// DHTML behavior for scrollable

Scroll/Zoom Windows.Forms.Panel controls


Is there some "thumbnail" or other "easy" way to provide the ability to have a populated panel of UserControl derived objects and scrollbar "move" them and "middle mouse zoom" them on the Client area of the panel?

I am using net FrameWork 4.0  The documentation leaves a tantilizing trail and I sure it can be done, but I do not want to miss something so simple like using the Thumbnail/bitmap/Background properties or methods of the Panel control? 

Thanks Everyone



Stop InfoPath maintaining scroll position on View Switch


I have a no-code multipage InfoPath browser form (2010), with repeated navigation buttons at the top and bottom of each page for ease-of-use.

When switching views using the bottom navigation bar, the scroll position is retained in the new view, so the user is presented with the bottom of the new page rather than the top...(!!)

I realise this is undesired postback behaviour, but can I disable/bypass this issue?


Stop Sorting Cross Tab Report Header


Dear, I want to stop sorting in cross tab report header. And also want to sort in specific order. How can i do that? Please help me. Its urgent


Css Friendly Adapters - asp.net Horizontal Menu - IE6



Hopefully someone can help.

I have an asp.net menu with horizontal static top tier followed by 2 dynamic vertical lower tiers.

It renders fine in all other browsers etc. etc. - apart from IE6.

In IE6 the menu is not rendered horizontally and insttead the items are stacked vertically.

It is my understanding that when using horizontal orientation, the menu items are effectively floated next to each other. 

So I can get round this float problem in IE6 by specifying a width for the items i.e.:


*html .AdminMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li
	width: 45px;
	text-align: left;
	margin: 0;
	padding: 0;

Problem is, I do not want to set the width for each item. If I do this then it means regardless of the length of the text the width will always be the same.

On other browsers I do not set a width but instead set left/right margin so that every item is evenly spaced.

How can I do this in IE6? Essentially each li should wrap the text and float nex

Data Security: Stop SQL Injection Attacks Before They Stop You


To execute a SQL injection attack, a hacker writes a Web page that captures text in a textbox to be used to execute a query against a database. The hacker enters a malformed SQL statement into the textbox that causes the back-end database to perform operations the owners did not intend it to perform, like making unauthorized updates. This article explains how you can protect against the all too common SQL injection attack in your own database. The steps covered include data validation, proper exception handing, and much more.

Paul Litwin

MSDN Magazine September 2004

UserControl like asp:Panel


Is it possible to write own User Control with functionality like asp:Panel?

Dynamic Checkboxlist exception when adding to Panel when using Master Page


In essence, I am creating Dynamic Checkboxlist controls and adding them to a Panel.  It works well when I do not have a Master Page configure to this webpage. Once I have a masterpage congifured.. I get a "Object Reference not set to instance of object" error on the Panel_Control.Controls.Add(Checkboxlistnew) line:

protected void Page_PreInit(object sender, EventArgs e)
        XML OXML = new XML();
        alistChkBoxLabels = OXML.XMLTransform("C:\\Documents and Settings\..\\Config_new.xml", "config_options/check_box/applications/app/@name");
        int count = 1;
        alistCheckisFacility = new ArrayList();
        alIDTracker = new ArrayList();
        while (count <= alistChkBoxLabels.Count)

            Checkboxlistnew = new CheckBoxList();
            Checkboxlistnew.ID = count.ToString();
            Checkboxlistnew.Items.Add(new ListItem(alistChkBoxLabels[count - 1].ToString(), alistChkBoxLabels[count - 1].ToString()));

            String sAppName = alistChkBoxLabels[count - 1].ToString().Trim();

            alistCheckisFacility = OXML.XMLTransform("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\WebSites\\User_Trial\\Config_new

Treeview problems in Update panel



I tried using this code, on a Treeview inside an update panel, which is populated dynamically in code behind. 

However, it doesnt give me the required functionality.

Following is my aspx code for the TreeView and the TreeView populating logic:


<div id="treelist">
<asp:UpdatePanel ID="UpdatePanel1&quo

Accordion Control with Panel...Add an Update Panel?


I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.

My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)

setting scroll position for a ListBox


I have a ListBox control showing 10 rows.  I have 30 rows total in the listbox.  How do I programmatically adjust the scroll to show the last ten rows?

Some sources have suggested that I set the SelectedItem.  But I am already making selections (myListBox.Items[28].Selected = true, myListBox.Items[29].Selected = true, etc); the listbox scroll is positioned on Item[0] not the first selected item.  I have also tried setting myListBox.SelectedItem in addition to the multiple selection just mentioned but that does not have any affect either.


update panel in content page



iam using master page  and i am using update panel in content pages (child pages)

my questions is that can use updatepanel in every child page or  master page only.

give ur suggestions, i have senario , in a page i have file upload concept ,updatepanel

is not support that fileupload.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend