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


Post New Web Links

Div position

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
 
How Do I Fixed the div postion at the bottom so that onclick event the another div is open at top of it ?


View Complete Post


More Related Resource Links

How to position one control relative to another one even after resizing windows?

  

I used following Jquery code trying to make image close to a table. It worked fine after first load, but the position changed after window is resized. Any ideas? thanks

$(document).ready(function() {
            var pos = $("#mytable").offset();
            var width = $("#mytable").width();
            var left = pos.left + width + 20;
            var top = pos.top + 200;
            $("#ctl00_ContentPlaceHolder1_imgPreview").css({
                position: 'absolute',
                zIndex: 5000,
                left: left,
                top: top
            });
        });


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.

Suggestions?


Balloon Tooltip doesn't display at the correct position when form is maximized

  
Having a problem with display balloon tooltip at the right bottom of form, the balloon tooltip displays fine if form is not maximized. However, the balloon tooltip doesn't display at the correct location when form is maximized(I guess because there is no room to display it on the right bottom of screen, so it moves up a bit). Is there a way to correct it? Such as displaying the balloon tooltip box above the control with stem points to the control. It displays the tooltip box below  the control right now which might cause the issue. Any help will be great appreciated.

Balloon Tooltip doesn't display at the correct position when form is maximized

  
Having a problem with display balloon tooltip at the right bottom of form, the balloon tooltip displays fine if form is not maximized. However, the balloon tooltip doesn't display at the correct location when form is maximized(I guess because there is no room to display it on the right bottom of screen, so it moves up a bit). Is there a way to correct it? Such as displaying the balloon tooltip box above the control with stem points to the control. It displays the tooltip box below the control which might cause the issue. Any help will be great appreciated.

C# ASP.NET Problem keeping scroll position SelectionMode="Multiple"

  
Have tried numerous solutions and nothing has worked.  I'm pretty sure that Javascript is required to get this functional. Thanks for your help!    Here is the code for file Search.aspx ===BEGIN<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="SearchApp.search" MasterPageFile="~/Site1.Master" EnableViewState="true"%> <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <fieldset> <legend style="text-align:center;"><b>Make Atleast one or multiple selections from one of the following categories</b></legend> <div class="wrapperserach"> <div> <div class="side-a"> County<asp:ListBox ID="Lcounty" runat="server" AutoPostBack="true" SelectionMode="Multiple" OnSelectedIndexChanged="Lcounty_SelectedIndexChanged" Width="140px"> <asp:ListItem value="1">Imperial</asp:ListItem>

SqlCeResultSet.Insert first position

  
Hi, is there an option to insert records in the SqlCeResultSet and put them in the first or any position?because the insert will only let me insert them in the last position, but I need in the first one.Thanks!

How to align text to top position on Ribbon buttons?

  
Hello SharePoint Experts, I have a custom masterpage which is derived from v4.master and it uses the default SP Foundation 2010 Ribbon. As you all know,the default Ribbon buttons such as New Document,Upload Document,Alert Me,etc, have text at the bottom below the icons. Ribbon buttons such as CheckOut,CheckIn,etc have their text aligned to the right of the icons. My requirement is to have all the text on Ribbon groups and buttons aligned to the top such that the image is below the text.(By default it is the other way round). I tried manipulating the CMDUI.XML file located at 14\TEMPLATE\GLOBAL but no use. I also tried overriding the Ribbon CSS(from COREV4.CSS) but it was of no use as well. Does anyone have inputs on how to get this done? Any help is appreciated. Thanks.Regards, Gautam Kaikini, MCTS WSS 3.0 Application Development.

Saving and restoring WPF Window size and position

  
I have a WPF window.  I want to do a very common thing:  Save the window size and position on close and restore them on open. I tried a C# approach and a XAML approach. I prefer the XAML but I'l take advise on either.  Here's the XAML I've tried: Title ="PVIEW" ResizeMode="CanMinimize" BorderThickness="0" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Loaded="Window_Loaded" Closing="Window_Closing" Closed="Window_Closed" SizeChanged="Window_SizeChanged" Height="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowHeight, Mode=TwoWay}" Width="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowWidth, Mode=TwoWay}" Top ="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowTop, Mode=TwoWay}" Left ="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowLeft, Mode=TwoWay}"> ... In Settings, I also created four entries, (all doubles) with the same names as the Path names above with all their values set to 0. Then I added this line to Window_Closing:  "Properties . Settings . Default.Save(

Get the row position of the group? merging query?

  
Hello! I am using SQLS2005. I have two tables: Unit: UnitId int PK Title varchar UnitOption: UnitOptionId int PK UnitId int FK Title varchar Quote: QuoteId int PK UnitOptionId int FK Title varchar I want to create a scalar UDF that takes a QuoteId param and returns a varchar that contains the following description (pseudu): Quote.Title + '-' + Unit.Title + '-' + Unit.UnitId + /* Here is where my question is: If there are more than 1 UnitOption under this Unit, then return '-' + the UnitOption number under this Unit (i.e.) if under this Unit, there are 3 UnitOption with IDs 13, 17, 55 under the unit, and the current Quote.UnitOptionId is the 17 one, it should return 2. Which means I want to retrieve an ID of this row in the group. Else return '' */

Get the Window Position from an external Process

  
Hi all, Well, this time I am pretending to get the size and the position of a windows process. In fact the size is not relevant to me cause it has always the same, but the position not. Showing the code Code Snippetprivate Process FindWindow(){    Process[] procesos = Process.GetProcesses();        for (int i = 0; i < procesos.Length; i++)    {        if (procesos[i].ToString().Contains("WindowTitle"))        {            return procesos[i];        }    }    return null;}I callProcess WindowA = FinWindow ();At this point i need to know how to get the windows position of that processThank,

Do you need a .NET position in Chantilly, Virginia (with a TS)?

  
 I represent a consulting company, and am looking for a .NET consultant for a long-term project in Chantilly, Virginia.  If you have: a current Top Secret clearance AT LEAST 3 years of ASP.NET in a development environment STRONG AJAX Web framework experience Strong understanding of web specific development methods ...and you need a position, NOW, then contact me IMMEDIATELY @ sean.gleason@mindbank.com

How do I get the ordinal position of a control without knowing, and more importantly, not needing to

  
Hello, How do I get the ordinal position of a control without knowing, and more importantly, not needing to know it's parent type? For example, this XMAL: <Parent of unknown type>      <Control Name="Control_1" />      <Control Name="Control_2" />      <Control Name="Control_3" />      <Control Name="Control_4" /> </Parent of unknown type> How do I get "Control_3"s ordinal position within its parent control? I know that I can do this:     UIElement p = (UIElement)Control_3.Parent; or even:     FrameworkElement p = (FrameworkElement)Control_3.Parent; but neither of those allow:     int i = p.Children.IndexOf(Control_3); nor     int i = p.Items.IndexOf(Control_3); If the parent is a StackPanel, I can do:     StackPanel p = (StackPanel)Control_3.Parent; and then I can do:     int i = p.Children.IndexOf(Control_3); I really do not want to have to cast the parent to a specific type, that would be a pain since there several types that could have children or items. Regards, Robert

problem with pushpin position in Bing

  
Hello guys! I have the problem with pushpin's position in Bing Maps. I have published my project to server: http://sergylens.narod.ru/bing/TestPage.html Try it! See the pushpin? Try to go left or right on Map! See the position of pushpin has changed. It's not static at all like in SDK samples. The another problem is, that I can't add more , than one pushpin!!! My code is just: <m:Map x:Name="Map" CredentialsProvider="HereIsMyKey" Center="47.620574,-122.34942" /> <m:Pushpin x:Name="Pun1" Location="53.19335,50.18986" /> Location loc = new Location(53.19155, 50.19098); Map.SetView(loc, 11.0000); So , if in Xaml I shall add more pushpins. The last pushpin I have add always override the pervious one. Sample: Pushpin #1 - 43.434334 / 42.4234234 Pushpin #2 - 54.324234 / 46.4243242 Pushpin #3 - 95.423424 / 32.1231233   So the #2 override the #1, and than #3 override the #2 and finally I have seen only the last pushpin!!! Where are anothers? Code: <m:Pushpin x:Name="Pun1" Location="53.19335,50.18986" /> <m:Pushpin x:Name="Pun2" Location="53.11335,50.38986" /> <m:Pushpin x:Name="Pun3" Location="53.05335,50.08986" /> And I see only the Pun3!!! Where are Pun1 && Pun2 ??? So, my problems are: 1). Non-static position of pushpin ( yo

how to save radiobuttonlist data into database when they are in disable position

  
hiiiiiam using 2 radio buttonlist controls in web application they are FIRST      Yes    NoSECOND  Yes    NoInitially  SECOND radio button list is in disable position.when i was click on yes of FIRST radio button list, then SECOND radio button list is enables otherwise it is in disable mode only.here my problem is when i am inserting data into the database the disable radio button list gives error as System.NullReferenceException: Object reference not set to an instance of an object.code written for inserting isprotected void Button1_Click(object sender, EventArgs e)    {                    SqlConnection con = new SqlConnection(@"Data Source=STS2\SQLEXPRESS;Initial Catalog=STS;Integrated Security=True");            string sql;            sql = "insert into Table1(";            sql += "First,Second)";            sql += "values('";            sql += rbl_first.SelectedItem.Value.ToString() + "&

Cursor Position not working on Form_Load

  
This is the only line of code in my Form_Load event and the cursor does not move to the submit button.I've tried to point it at other controls on the form and I get the same result...the cursor moves but to an area on the form (somewhat bottom left) where no control exits. System.Windows.Forms.   Cursor.Position = new Point(btnSubmit.Location.X, btnSubmit.Location.Y);Paul Reed

stay with the selected position in Grid View

  
I've got one columns of check boxes in a GridView, when i select the checkbox entire record(75 columns) is poupulated into formfileds resided just below the gidview. The problem I'm having is that when i selelect 50th record of database(db have 100 recrds) the view state should be  on 50th record level but it is scroll over to the toplevel after selecting the checkbox, if user wants to select the 51st record again he scroll to that level.how can i over come this problem.

Header Floats right on Fixed Position

  

Hi,

I have a header with div having a fixed position, to stay at the same position even if the we schroll the page up/down.

No the issue is with the position, as users with low screen resolution are having the header on the left side, due to the fixed position, and i have the right margin set to 117px, so it shfits towards the left.

  <div style="position:fixed; z-index:1; background-image:url(/images/portlet/icon_base_strip.jpg); 
                                top: 0px; width: 1025px; right:117px;  height:21px; " align="center" > 
                            <table width="800px" height="16px" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td colspan="2" style="height: 21px">
                                        <table border="0" cellspacing="0" cellpadding="0" align="right">
                                            <tr>
                                                <td style="width: 25px" valign="top">
                                                <a href="http://192.168.1.20:85/logon.aspx" target="_blank">
                 
Categories: 
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