I found that I haven't written anything for a long time.
It's getting lazy...
Write something antique.
Although IE's market share plummeted, some functions of IE8 are still good.
Webslices is one of them.
Let's take a look at the effect of webslices:
Refer to msdn
Webslices uses three divs on the page.
<div class="hslice" id="TestWebSlices"> <div class="entry-title">WebSlices Title</div> <div class="entry-content">WebSlices Content … </div> </div>
The ID of the outermost Div cannot be empty.
The following experiment is performed on the page:
Create a new page named testwebslices and add the DIV as follows:
<body> <form id="form1" runat="server"> <div class="hslice" id="TestWebSlices"> <div class="entry-title">Test WebSlices</div> <div class="entry-content"> <asp:Label ID="Label1" runat="server" Text="Hello World"></asp:Label> </div> </div> </form></body>
View the results in IIS:
Add to favorites bar:
Success
Next we will modify the page content:
<asp:Label ID="Label1" runat="server" Text="Hi ,content is changed!"></asp:Label>
Refresh the testwebslices on the favorites bar:
Well, it looks good.
Others:
If the title is not suitable for display on the page, add the attribute
style="display:none;"
You can.
That's all.
It's actually quite simple.