Friday, August 6, 2010

Html / Aspx Bookmark Page


Html <a> tag is very useful for creating bookmark. Html bookmark tag link navigates the web page to the targeted location of same of different page.

Default Page will be load on top, we can load page on certain top position using <a> attribute.

Following example is given in asp.net.

<body>
<form id="form1" runat="server">
<div style="height: 300px; background-color: red; font-size:300%">
First Div
</div>
<a id="BookMark2">
<div style="height: 300px; background-color: Green; font-size: 300%">
Second Div
</div>
</a>
<a id="BookMark3">
<div style="height: 300px; background-color: Blue; font-size: 300%">
Third Div
</div>
</a>
</form>
</body>

When you load page it will display as below


Now if page load using #BookMark2 using http://localhost:59495/Desktop1/Default.aspx#BookMark2

It will display as below.









==============================================
Nirman Doshi|Senior Software Engineer

WebMingle Technology
Accelerated by knowledge. Driven by values.
www.webMingle.in

No comments:

Post a Comment