Change theme dynamically without page refresh in ASP.NET - asp.net

You must have noticed one link in yahoo.com, msn.com or other popular websites named "Page Options". When you click this link you get a popup displaying different small several color icons. After clicking one of these icons your page theme changes without entire page refresh. Now you are able to see the same page with different look and feel.
How does it happen and what it takes to do it? Is this possible in ASP.NET? If yes, how to do it?
Show me some syntax.

Here is an example of how to change CSS stylesheets on the fly using jQuery.

Related

Wix type page transitions? how to remake from scratch

Not sure if it's an appropriate question, but I will still ask..
Any advice on how WIX (the simple website builder) sites do the page transitions? such as transiting into a page with a Left to Right swipe in and loading the page on demand?
I have tried searching for tutorials but I am not too sure what to look for exactly.
Are these CSS and a combination of jquery?
Any advice would be appreciated.
An example site of the said transition:
http://www.alllinkmedical.com/
Thank You.
EDIT I mean to ask: where do I start looking at to create such page transitions on sites built from scratch
http://www.wix.com/support/main/html5/wix-editor/pages#Changing+Your+Page+Transitions
Taken from Wix website:
Changing Your Page Transitions
You can choose a page transition for your pages. The page transition determines how your pages will shift and what your visitors will see when they navigate from page to page.
To change your page transitions:
From the left side of the Editor, click the page icon to open Pages.
Under Page Transitions, click the drop-down menu and select a transition.
Now if you want a custom transition, I'd recommending looking at jQuery

Drupal6: Theming Node Edit pages / Opening within Lightbox

I'm trying to display all node_edit form neatly within a lightbox without any of the excess content I don't want. No sidebars, footer, header, nothing. Just the content. So I created a page-node-edit.tpl.php file.
I have two problems daunting me, but for now I'll only mention the first since its more important.
1) From any drupal page, clicking on the "edit" link for the node doesn't activate the lightbox like it should. Instead it clicks-thru the link as normal.
With jQuery in the header I added a rel attribute for the lightbox to the links, but the box still doesn't activate. I tested the lightbox on a link I hardcoded into the page, and it activated just fine. For elements generated by Drupal, like the node edit link/button the problem seems to be timing.
I think the rel attribute needs to be built with the page, with the link, rather than appended onto it. The catch is, the link lacks an id and class, so I don't see how the hook_alter_link() function can help me.
I'm willing to try anything. Perhaps someone has done this before? Opened a node/edit form within a lightbox.
Any suggestions would be greatly appreciated.
I've seen the Modal Frame API used in a few modules (Node Relationships uses it to do something very similar to what you're doing); might be helpful...
http://drupal.org/project/modalframe

Dynamic theme in asp.net

i want to develop our site in such a way user can choose theme. when user will choose theme then i want show the images of our site' home page with various look and user will just choose the images and theme of our site will be change. i know how to change theme from the code behind.
my question is that how could i display the various images of my site's home page with different look which user choose. please tell me the way out. if possible give me a small code to generate the images of my site's home page with different theme attach which user will choose. if anyone know any sample of such things according to my requirement then please give me the url from where i can download the sample.
thanks
I think I know what you're trying to say, and I would go about it like this:
Apply a theme to your site, then run it
Take a screenshot of your homepage
Open Paint and paste the screenshot onto the canvas
Save the image as "MySite_Theme1" or something like that
Once you have followed these steps for each of your themes, do the following to apply each preview to a button
Add the screenshots to your site's Images folder.
Go back into your site and create an <asp:ImageButton> for each theme. Apply ID, ImageURL, ImageAlign, runat, Height, and Width. The control should resize the image based on the button's height & width.
Go to changing themes with buttons, how? for coding the code behind.
I hope this helps you out
EDIT: I would also look for the book Beginning ASP.NET in C# & VB. Wrox is the publisher. I have found that and a lot more at www.wowebook.com :)
You could use ASP.NET Themes which could be changed dynamically at runtime.

Disabling the whole page untill the loading process gets completed

I have one web page in ASP.NET and I want that page to be disabled until the whole page loading process gets completed.
One way is to activate a lightbox without content that will dim the whole page and then on the body onload event hide that lightbox.
Lightbox is a like having a modal window above the original window, and is used to preview pictures and other content. It could easy be modified to do what you want. Just activate a lightbox with no content and then hide the lightbox when the document is loaded.
This is a strange requirement and I would be interested in finding out your reason for doing this. Is there a problem or error that is ocurring. Perhaps you think the best way to prevent the error is to freeze the UI until the page loads.
I think that you should edit your question and describe what the underlying issue is. There might be a better way to improve your page.
I've seen this done with a simple overlay before.
Basically an iframe and a div that covers the page and has a high z-index is output at the beginning of page render. This is styled so it greys the page out and it also makes everything non-clickable. Then, once the page is loaded, a simple bit of javascript can be used to remove the div and iframe (or just set their styles to make them disappear).
I've also seen people attempt this issue by manually iterating over all controls on the page in JavaScript and disabling them. This is a horrible way to attempt it :)
The jQuery BlockUI plugin is another good option with lots of customization options.

What approach to take for an ASP.NET web application w/ tabs

Hey I just began working on a new project that requires, tab navigation, and within each page, more tab navigation, and then within those pages dynamic ASP.NET content. The problem is I do not want all of my code on one page, that would just be a very large and bloated page. I was wondering what available methods of approach there are for this issue. I checked jQuery tabs, and I see I can link html files using AJAX but I need aspx files not just HTML.
Thanks ahead of time.
I've had to deal with this on many projects. After trying quite a few libraries my approach to tabs is to always do these myself using plain CSS.
But note having multiple layers of tabs is a but usability no-no. Remember Windows 3.x and 95 did this quite a bit. It's less an issue these days. You can try an accordion control along with the tabs to filter your screens
One one particular project, we used DevExpress ASPxTabPages for a while. These worked well, but were a bit heavy for such a simple task. We then moved the project to JQuery, but ran into situations where JQuery UI Tabs started to be an issue as well. Particularly when generating tabs using master pages and render actions in ASP.Net MVC. We finally settled on regular CSS and HTML. Javascript really isn't even needed. Though I'm sure JQuery can be used to spruce things up.
An example of CSS tabs can be found at http://www.htmldog.com/articles/tabs/. There are live examples on that page as well.
what you could do is:
make a tab a span
when clicked on that tab/span, fire jquery and do a GET to a page on the server which represents the tab content
pro: no initial loading of the content of the tabs
Con: slight delay when you click a tab (first time only if you can cache the content of the tab)
this is done when you think that only a few of all of your tabs are clicked: you don't have to load all the data users ain't gonna see.
If you think the user is going to look at all the tabs, then you can load everything in one page. You can use a user control for each tab so no super large page and wrap the output of the usercontrol in a DIV
Then also make a tab a span, and when clicked on the tab/span, make the right DIV visible and hide the others.
I just made a user control that contained the Ajax Tab Control for my sub menu. Each tab actually takes you to a different page.
I blogged about how I did this HERE.

Resources