how to setting form display - css

i have a form input..i've been made it using jquery...
i want my form show not too long..but actually it need to scroll the page in monitor..
how could i setting my form eventhought i have much item for input data??
i want my form show in one page (no need use scroll bar)..

You can make sure that the height of the page does not exceed the standard size.
Or you can use an Iframe inside a DIV.

Related

Set aspnet textbox height based on text on page load

I am looking to set the height of an aspnet textbox based on the amount of text so there is no need to scroll on page load when text is loaded from a database field. I need to do this in code behind so the height is stored on the server.
I am able to resize the textbox using javascript as text is entered or removed however I need this to also be done on page load and again that height be stored server side.
Any ideas?
Try using http://www.impressivewebs.com/textarea-auto-resize/ - In short, it's a jquery function that allows you to invoke a resize. Once referenced, use $('#myTextarea').autoResize(); on keyup, blur, whenever.. to invoke the resize function.
Credit: https://css-tricks.com/textarea-tricks/

Part of custom control should be rendered only once

I am working on a custom control. Part of it is to render a div that is not displayed right away. Based on a particular client event, that div is shown. Everything works fine when there is only once instance of the custom control on a page. But in case of multiple instances, that many above mentioned divs are rendered, though not displayed. To make container page lighter, I basically want to render that div only once, irrespective of the number of occurrences of the custom control. Any help would be great.
Thanks,
Surya
Perhaps you can store a flag telling that that div has already been rendered. You can store that flag in HttpContext.Items. Here is some code
if ((bool)HttpContext.Current.Items["divRendered"] == false)
{
//Render the div
HttpContext.Current.Items["divRendered"] = true;
}

Forcing custom item renders to refresh

I have an AdvancedDataGrid. One of the columns in the grid displayed with help of custom render. During the application run, I set another custom render to the same column. When I scroll data in the grid (change values for the custom renders) they display new view correctly.
I want that they dispaly new view automatically (when I set them): so I think I have to call them and tell tham to refresh rgeir views. Any idea how to do this?
Use invalidateList()

How should I design my page to allow for dynamic movement of elements on the page?

I'm working on an ASP.NET page where I've got 10 entities. I'll call them Items. An Item can be displayed in one of two modes: Featured or Thumbnail. At any given time there is one Featured Item at the top of the page, and the rest are Thumbnails arranged in a 3x3 grid underneath the featured Item Each item is an ASP usercontrol that contains two divs: one div for Featured and one for Thumbnail -- when the item is Featured, the Thumbnail div is set as invisible and vice versa.
My current goal is to be able to click on any of the Thumbnails and have it physically swap places with the currently featured item to make the clicked Thumbnail become the new current Featured item at the top of the page. The eventual goal is to use jQuery to animate the movement but this is only a side consideration at this point. Also please note that I am trying to do all this without the use of page refreshes (i.e. I wish to use AJAX or javascript)
Here are some of the possibilities that I have been thinking about:
Put the entire page inside an UpdatePanel and rearrange which Item usercontrol goes to which placeholder (i'm using placeholders)
Pros: easy
Cons: VERY INEFFICIENT. Each Item already has a couple UpdatePanels in them despite my trying to minimize my use of them
Use jQuery/javascript to swap the order of the items' occurrences within the page
Pros: simply swapping the order would work because I have the items arranged by floating
Cons: my javascript/jquery is weak, and if a user ever navigates away and comes back the change will not persist.
Dear web dev wizards out there, what would you do if you were in my shoes?
This feels a bit like a slide show. As such, I'd go strictly client side javascript. I wouldn't worry too much about state persistence though you could do that if you want by setting a cookie or appending the url with anchor hashes.
Also, at that point, you wouldn't really need multiple DIVs for each item. You could, via the jQuery move the div itself and then change the SRC attribute (and CSS) of the image to go fetch the larger one.

How to populate long text in dropdownlist in asp.net

In asp.net, am trying to populate a dropdownlist box with very long text. I have fixed the width of list on the page and i don't want to change its size as it would affect my page layout. On clicking the dropdownlist, the text gets truncated to the size of the dropdown. I want to see the entire text without any truncation, without changing the size of the dropdownlist box..Also if there are any third party controls which would solve this problem?Would be very helpful if there's a solution for this.
Update:
Right now am trying a dropdown box in Jquery that will wrap the text if it exceeds the size..but again the problem is it works fine on an independent solution but when i integrate it with my application, it does not read the .css file and it does not do any formatting(style, font, alignment) that it is supposed to do according to the .css file.Any idea why this is happening?
The problem that you're describing is restricted to IE (it might be fixed in the latest version, I haven't tested).
In the past, I've had success with binding javascript methods to the onClick event on the drop down to increase the width, and the onBlur event to set the width back to its original value.
You might be able to use jQuery to create a tooltip like thing that appears when you hover over each option.
something like
// this executes on page load - just like asp.net Page_load()
function pageLoad(){
// attach a mouseover event to each option in your dropdown
$("#myDropdown option").mouseover(function(){
// get the text from that option
var text = $("#"+this.id).text();
// display that text in a small tooltip
showToolTip(text);
});
}
function showToolTip(text){
// display in some way
}
there's a javascript library called wz_tooltip available at walterzorn.com
hope that helps

Resources