how to make the panel size fixed inside the modalpopupextender - asp.net

Hello, I have two tables inside the panel of modalpopupextender.
I want size of the panel to be fixed whether or not both tables are visible inside the modalpopup.

You can do this like as
<asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" style = "display:none;min-width:20px;min-height:20px">
</asp:Panel>

Related

Horizontal scroll bar issue when using rtl style with TreeView

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>

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;">

How to put an Vertical scrollbar within asp:Repeater ItemTemplate?

I have inherited an .ascx control that consists of an asp:repeater construct containing a HeaderTemplate, an ItemTemplate and an empty FooterTemplate.
Both the header and the item templates are linked to a data source.
My question is simply this, I want to have a vertical slider applied to the ItemTemplate such that I can scroll up and down the items contained within whilst the HeaderTemplate remains static.
I have tried using an asp:Panel within the ItemTemplate but this doesn't render the row within the template.
I've resorted to encapsulating the whole of the asp:Repeater within an asp:Panel that specifies a vertical scrollbar. This works but scrolls the header out of view if the number of rows in the ItemTemplate is large.
If anyone can help and suggest a way forward I would be most grateful.
It can be done in a simple manner with some CSS tricks e.g.
Repeater Item Template Markup
<HeaderTemplate>
<div class="template">
</HeaderTemplate>
<ItemTemplate>
Your Stuff
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
CSS Defined for "template"
.template {
height: 200px;
overflow-y: scroll;
}
Hope this will help !!

Changing a div to Text Box?

I have a div area like the following in my .aspx program.
<div id="valueIntroduction" type="text" class="labelarea" runat="server">
</div>
<div class="line"></div>
<asp:Button ID="editButton" runat="server" Text="Edit" />
Currently the div valueIntroduction is getting data from database. I have a Edit button in my program. When i press Edit button I am trying to change the div to text box.
Try this..
1.Add a textbox and make visible="false"
2.when clicking edit button copy the div's contents to the textbox and make div invisible by using visibility:"hidden".
3.Set the textbox visibility to true.
Try putting an invisible textbox below your div, then when you click the edit button, transfer the contents of the div into the textbox, make the textbox visible and the div invisible.

ASP.NET A problem with Panel Direction property

I add a user control dynamically (which only contains a table) to the Panel:
<asp:Panel ID="panel" runat="server"
ScrollBars="Horizontal" Width="160" Direction="LeftToRight">
</asp:Panel>
when I add e.g. two user controls, they have vertical direction. Why ? I want them set from left to right (horizontally)
The Direction property only sets whether the text is displayed left-to-right or right-to-left. It's a usability feature.
What you'll want to do is use CSS to perform what you need. Look into float: right;

Resources