Adding a copyright message to images whatever size they are - asp.net

I would like help for ways to add a copyright footer on web page.aspx so that it always remains at the end no matter the size of the image.
When my image increases in size, the copyright message should still appear on it.

Do you want copyright to appear on image or your aspx page ? If you want it on your aspx page, just wrap it inside a div and place it in your master page in the end.
If you want it on an image in your aspx page your should consider water marking it instead.

Related

Link in iframe causing parent page to jump to top

I have a long html page. At the bottom is an iframe with a long list of links. The links open new pages in the iframe.
When links are clicked inside the iframe, the parent page (as expected) jumps to the top and I have to scroll way back down to get back to the iframe and its newly loaded page.
Here's one hurdle. The iframe contents is hosted on another server outside my control. The admins there have graciously added a call to a js file hosted on our server from the iframe src, but I still can't crack this.
Do I need to calculate the distance of each link from its window top and also the iframe's distance from it's window top and do a bunch of math and then scroll back to that position after the new page loads?
Suggestions?

Master and Content Pages VB.Net

I created a master page using visual studio. I'm trying to add content my pages but I'm having an issue. It's probably a simple thing that I'm missing.
My master page has a few divs. Basically a Header, a Sub Header, a left column with a menu, a Footer and then the bulk of the page is my Main.
My example video shows the instructor just dragging an image over to the body of the content page (in design view) and it works. She also dragged a gridview and a couple other items.
This part is annoying me because it's hanging me up.
Any thoughts?
I figured it out. I created several divs. When I did this my content placeholder shifted all the way down to the bottom, which is why my content was placed on the bottom.
I fixed my code so that way I had something like this.
<div id="Main">
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
which fixed it. You need those lines and the in order to place the content in the main.
I am happy I found my problem.
JWV

asp.net master pages, content pages

i have a master page with three sections, left pane + 2 right panes (one top header and one main screen area)
i want to have the main screen area dynamically fill a url based on a link click from the top header pane.
so in the header if i have three links - assume i have three pages (one.aspx, two.aspx, three.aspx) and i want to click a one, two, three link in the header pane of the master and have the content load in the main area of each associated child page in the main areas.
any idea?
The point of ASP .NET master pages are to do exactly what you are wanting without needing to fill areas of the page.
What I would suggest doing is moving the content that does not change per page (e.g. left pane and the top header/right pane) into the master page. and create a contentplaceholder for your main screen.
Then create your one.aspx, two.aspx, three.aspx pages and have them use your new master page. Now, when you edit the pages, the only area you will edit will be the content for the main screen area.
Any changes you make on the master page will be immediately reflected on all three pages without having to update each one.
If you had a different goal in mind please let me know. I'll do what I can to help.
When you created your pages you should have selected the MasterPage.
On each page you fill the content areas of your MasterPage.
So if you want to link to your pages you can put the links in each page's Head ContentPlaceHolder. So you link to 'one.aspx', 'two.aspx' and 'three.aspx' directly.
Each page will load it's MasterPage contents when it's requested. So it works like includes not frames (forget frames).
Just create your master page with your layout divs and use the to leave a place holder inside your content tab.
Next create a new page that uses your master page as its base and inside the automatically generated tag put your specific content for that page.
Create a new page inheriting the master page for each content page you want the header links to point to.
Hey presto no need for frames or script.
I'm not sure I completely follow your intent, but if I do get it, it sounds to me like what you want is a floating frame.

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 show content from contentPlaceholder inline

I have a page where in my masterpage have a toolbar with a "Home" button to the far left. This button is not in a contentplaceholder but on the page.
I want to have the opportunity for derived pages to add their own controls or whatever to the toolbar to be whown after the "home" button. But how to do this?
I have tried to put in a contentplaceholder, but it seems that I cannot get it to show inline with the other stuff, it breaks and the content of the contentplaceholder is shown below the button instead.
Does anyone know how to solve this?
Update:
Regarding the comment from #Remy below:
Do you, by chance, have a line break
in the masterpage's markup between the
button and contentplaceholder?
I started looking and because I'm a bit inexperienced at designing with CSS (when aligning text and an image vertically center). I created a table that enclosed each button - forgot that table are block elements, so there was my line break.
You can make the toolbar in the MasterPage available through a public property. Then you can access the master page from the content using Content.Master propery. Then you can add the controls to the toolbar as you add any runtime control.
Also, you need to Typecase the Content.Master to the type of your master file class before accessing its public property.
There are many ways:
from derived page you can get to the master page content over Page.MasterPage, and manipulate by controls located there. So you just need to allocate at master server-div or Panel and locate it by Page.MasterPage.FindControl to populate with particular inline elements
ContentPlaceholder does nothing with HTML layout, so you header can looks like:
<div>
<span> <!-- your Home button declaration goes there --> </span>
<span> <asp:ContentPlaceHolder ... </span>
</div>

Resources