I wanna have, when a user clicks an button, the screen should go black and in the middle should be a new webpage.
I know this is very often used for Images, but I know it is possible with webpages too.
How is the name of this feature and how I can get it for my asp.net page?
Are you talking about a "Lightbox" effect ?
http://line25.com/articles/rounding-up-the-top-10-jquery-lightbox-scripts
Modal window
ASP.NET AJAX Toolkit has the ModalPopup control,
Or can use many jquery plugins (ThickBox for example).
Related
I have a div and inside that I need to show a slide of divs. On the page load there would be only 3 div slides but when all three divs are displayed on the next button press I want to load some more divs (actually I have data on a sql database, I need to get them and print on the page a slide divs) on each next button press. (Asp.net)
How do I achieve this? what's the best way? Ajax, javascript, jquery. Show me a way.
Thank you.
There could be many possiblities but you can use asp.net update panel avialable in ASP.net ajax control toolkit, it will be easy for you to integrate and you need to do very small work at your end.
The other option is using jQuery ajax it could reletively more efficent and gives you more control but it will require good javascript/ jQuery skills. This tutorial is good starting point for using jQuery ajax with asp.net.
Hey As the title suggests I see a lot of forms done in ASP.NET lately which seem to open over the current .net page, fading out the background. Validation of the forms is done on the floater form and if all good and submit is clicked the forms goes back to main page etc..
Just wondering what tools are used to do this, and if anybody has done this and could provide some sample codes.
Thanks in advance
I think you need to look at Jquery UI. There is a Dialog (follow the link, then click "Create New User", this is the modal input form with blanked out background) which achieves what you are after. There are good examples on the website too.
I am building a Web Application using asp.net (C#). I come from windows forms development and find myself in a hard spot. Im making an application where the user should edit some simple information about himself, and thus i need to create a new dialog. How do I do that in asp.net? I have a button which event is handled serverside, and when i click lthis button i want to popup a dialog where i can show my custom web control (or any web control, lets make it generic from the start). How do I go about with doing so?
I got some part of the way by looking at the internet, that i need to make a section and set the z-index to 1000, but how do i make it visible (block)? Please help here as i am completely lost...
/H4mm3rHead
If you're not concerned about using a library, try Microsoft ASP.NET AJAX Control Toolkit, they have several controls that can create something you want (the ModalPopup control).
The AJAX Control Toolkit has a ConfirmButton extender which will do exactly what you are looking for.
I used to do the following:
1. my new pop up is just a new aspx page like any other page
2. add a button (or just a link) that fires a client side java script function
3. in the function I use window.open and put params to open my popup page with no toolbars or scrollbars and proper size to its content
check this for more info on #3
Looking for a custom tooltip (typical yellow baloon callout) on click of an anchor tag. The tooltip should appear and remain in view until the cross button on the tooltip is clicked.
Just looking for a tried and tested open source solution. Tried googling this but most of the tooltip [...missing info?...]
Ajax control toolkit has the calloutvalidator which seems like a good choice but is tied up to be used for validation tooltips.
I'm not aware of many good open source server side controls. But you should take a look at these:
http://www.obout.com/flyout/example_Googlemap_tooltip.aspx - Free for commercial and personal use
http://aspalliance.com/1686 - Creating a Custom Tooltip Ajax Extender Control
http://craigsworks.com/projects/qtip/demos/ - qTip for jQuery. It's not an asp.net control, but could work well for you.
I am writing an ASP.NET 3.5 web app that displays a list of items. I want to be able to display a non-modal popup with details when the user selects an item. I want to be able to display several detail popups simultaneously. (i.e., the user can click an item to see its details, then click another item to get another popup.) Currently I call RegisterStartupScript during postback to write a "window.open(...)" script to the page when it re-renders. The problem, of course, is that this requires a full page postback and refresh.
It occured to me that this might be a perfect use for XMLHttpRequest or AJAX but I don't know how to do it (or whether it's even possible or smart to do this). Can someone show me the way?
I have the AJAX Extensions installed but I'd prefer not to use the AJAX Control Toolkit.
EDIT:
Some clarification: When the user selects an item a custom event is raised. On the server I handle this event and use some server-side logic to construct a URL which I then use with RegisterStartupScript to construct a "window.open(myUrl...)" script. But posting back the whole page to do this seems inefficient and I'd like to know if I can just make a call to a simple server-side function that constructs the url and sends it back without having to roundtrip the entire page.
Creating a popup has very little to do with AJAX, and a lot more to do with JavaScript. See the jQuery dialog library here. You can then use jQuery's AJAX API to do your server dirty work :)
jQuery Dialog UI
--
Bill Konrad
Devtacular - Web Development Tutorials
You can use DHTML Window widget.
It offers many way to display either modal or non modal window.
Also it supports AJAX.
You can use dhtmlwindow for open a new window, or
dhtmlmodal to open a new modal window.
Of course, you can edit it to match your requirement.
Sample:
var insWindow = dhtmlmodal.open("insbox", "iframe","UserMaster.aspx?" + queryStr, "User Master", "width=425px,height=500,center=1,resize=0,scrolling=1", "recal");
Do you really need to open a new window? Opening an absolutely positioned DIV or a new layer on top of the current page in the same window is all the rage these days.
Edit:
I don't think it would limit the number of popups, there is some neat stuff that can be done these days with libraries like jQuery + jQuery UI, you can simply create as many of these DIVs/layers as you need and make them movable, resizable, etc. Only thing that real popups have and these do not is that they do not appear on the tab panel/taskbar.
Yes, you will be limited to the size of the window in which is the main page opened, however, I don't personally see it as a problem since most people surf in a maximized browser window anyways.
Implementation of the oldschool typical popup window is undoubtedly much easier for you, but it also runs into problems with end user popup blockers. Just had that problem # my work, they needed to make a popup during the certificate authentication process for some reason and as soon as Yahoo released a new version their toolbar, it quit working).