Web Studyaspnet.blogspot.com Babyneed.blogspot.com

ASP.Net Web Developer Guide

Power By: eXTReMe Tracker Powered by Blogger  
 
 
 
 

 

 
Important Links
 
   
     
 
Sitemap
 
   
   
 
Reference
 
   

Wednesday, March 22, 2006

Using HyperLink Controls(Chapter3)

The HyperLink server control enables us to link to a different page. Its Text property is displayed on the screen as a hyperlink. On click of the hyperlink, it links to a page specified in its NavigateUrl property.The displayed text can be replaced by an image by specifying the ImageUrl property. In our next example, we will develop a page with two HyperLink controls. One of them will display text, and the other will display an image.We will specify the “http://ahmed2/Chapter3/ServerControl4.aspx” in both of their NavigateUrl properties.The completed application will be displayed in IE as shown in Figure 3.46.When the user clicks any of the controls, the system will display the specified page.
Figure 3.46 Illustration of the HyperLink Server Control

Figure 3.47 Complete Listing for HyperLink1.aspx
<!— Chapter3\HyperLink1.aspx —>
<%@ Page Language="VB" Debug="true" %>
<html><head></head><body>
<form runat="server">
<asp:HyperLink id="HyperLink1" runat="server"
NavigateUrl="http://ahmed2/Chapter3/ServerControl4.aspx"
Text="Go to a simple page"/><br><br>
<asp:HyperLink id="HyperLink2" runat="server"
NavigateUrl="http://ahmed2/Chapter3/ServerControl4.aspx"
ImageUrl="http://ahmed2/Chapter3/BaitcastReel1.jpg"
Text="World's Best Fishing Reel"/><br><br>
</body></form></html>

0 Comments:

Post a Comment

<< Home