Horizontal scroll bar issue when using rtl style with TreeView - asp.net

The problem is that the website is very wide. A horizontal scroll bar is added and the width of the page becomes like 10000. The problem happens once I use treeview if the page style is RTL.
If I change the page to LTR or if I remove the treeview, the problem disappears.
Can anyone help?

set this property for treeview
SkipLinkText=""
<asp:TreeView ID="TreeView1" runat="server" SkipLinkText="">
</asp:TreeView>

Related

Asp panel Vertical scroll bar always visible

I have created asp web page with asp panel as bellow
<asp:Panel ID="pnl" runat="server" ScrollBars="Horizontal">
</asp:Panel>
In IE Browser(8,9,10) it will always enable vertical scroll bars but Firefox is only show horizontal scroll bar.
In here I need only Horizontal scroll bars how to solve this problem?
try this. It's a HTML 5 property so it may work in modern browsers.
<asp:Panel ID="pnl" runat="server" style="overflow-x:scroll;">

Why do ASP.NET TreeView nodes align middle

Why do ASP.NET TreeView nodes vertically align middle by default? Is there a way around it? I want to have a full page height TreeView with nodes aligning top. This simple line creates a TreeView with nodes appearing in the middle of the TreeView:
<asp:TreeView runat="server" ImageSet="Inbox" ID="tvMain" Height="500px" />
This is VS2010 + ASP.NET 4.0 if that has something to do. Plus I'm open to CSS solutions if that is what it takes.

Twitter Bootstrap `container` divs in ASP.Net WebForms

I have found some info on container use in Several containers at one page and Twitter Bootstrap Containers, but was left wanting a bit more input.
From Twitter Bootstrap's own example we see multiple container divs on the same page. But what about ASP.Net MasterPages and UserControls.
Should a single container be used on the Master, therefore enclosing all Content areas in a single top-level container (and then the Content pages would be comprised of row divs)? Or should the container div be pushed down to the Content page?
And taking this one step further, what about a rather complicated UserControl (.ascx) that is comprised of several row divs; should the ascx markup have its own container, or start with a row div assuming the containing page has an enclosing container?
Finally, more generally, does anyone have a rule-of-thumb regarding when to use a new container div?
I put the container div in my master page since all my pages will be using the row/span's in the child pages. In the unlikely event that I want my child page to not use the container, I simply close the div tags...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
</div> <!-- ending the container -->
<!-- whatever -->
<div> <!-- the master page ends the container div, so we'll add this instead -->
</asp:Content>
A few helpful hints with bootstrap and asp.net...
Radio buttons and checkboxes.
The text appears underneath the radio/checkbox. Fix this by nesting your asp.net radio button list control or similar control inside a div with the radio css class or checkbox css class, and setting the RepeatLayout to flow.
<div class="radio">
<asp:RadioButtonList ID="rblFleettype" runat="server" RepeatLayout="Flow">
<asp:ListItem Selected="True">Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
</asp:RadioButtonList>
</div>
Alerts for error messages.
A lot of asp.net controls can be converted to templates to expose the error literals/labels, then you can apply CssClass="alert alert-error" to the error label. But if you do this it will show the red error boundaries even when there is no error yet. To fix that you can use the PreRender event for the literal/label to check the Text property and see if it's empty, and then set the Visibility property accordingly.

ASP.Net Modal Popup position

I have a web user control with a modal popup extender in it. the modal popup contains an asp:Panel control in it. This panel contains other controls.
I'd like to make the modal popup scroll as the user scrolls the page. (position:absolute)
Tried to set X and Y properties of the popup extender. it changes the X and Y properties of the popup. But still: position:fixed
Tried to set the Panel's CssClass to (.ModalWindow) which has the following defiition: .ModalWindow{position:absolute;} But the position:fixed overrides it.
Tried to wrap the asp:Panel in a div: <div style="position:absolute;"> But still no luck.
Have you tried the following:
.ModalWindow {position: absolute!important;}
The !important override is a really handy trick, particularly when working with ASP.NET controls.
Here's a bit more about it:
http://www.electrictoolbox.com/using-important-css/

ASP.Net Vertical Menu with Scroll functionality

Referring to Menu / Scrolling Example
I would like to create / find the same functionality for a vertical menu. I tried the following.
<asp:Menu ID="menuAccountMembers" runat="server" StaticSubMenuIndent="16px"
Visible="true" RenderingMode="Table"
ScrollDownImageUrl="~/Resources/scrolldown.jpg"
ScrollUpImageUrl="~/Resources/scrollup.jpg">
<Items>
But it doesnt display any scrolling images. I am using .net 4.0
Tried setting menuAccountMembers.RenderingCompatibility = new Version(3, 5); as well.
If there a property to only display the first 5 root menu items, then show scroll bars for the rest? It can be click-able, no need to hover over to show next item.
Found the Jcarousel sufficient

Resources