<html>
<title>第十例 HtmlInputHidden和HtmlInputImage控件使用</title>
<head>
    <script language="VB" runat="server">
	 Sub Page_Load(sender As Object, e As EventArgs)
        
     	   If Page.IsPostBack Then
'把hidden的值传递给span2和span3
     	       Span2.InnerHtml="Hidden的值: <b>" + HiddenValue.Value + "</b>"
	       Span3.InnerHtml="Hidden的值: <b>" + HiddenValue1.Value + "</b>"
    	    End If
  	  End Sub 

      Sub Button1_Click(Source As Object, e As ImageClickEventArgs)
'把第一个文本框的值传递给hidden
         HiddenValue.Value=StringContents.Value
          Span1.InnerHtml="您点击了按钮1"
      End Sub

      Sub Button2_Click(Source As Object, e As ImageClickEventArgs)
'//把第二个文本框的值传递给hidden
          HiddenValue1.Value=StringContents1.Value
          Span1.InnerHtml="您点击了按钮2"
      End Sub
    </script>
</head>
<body>
    <h3><font face="Verdana">第十例 HtmlInputHidden和HtmlInputImage控件使用</font></h3>
    <form runat="server">
	 <input id="HiddenValue" 
             type=hidden 
             value="Initial Value" 
             runat=server>
	<input id="HiddenValue1" 
             type=hidden 
             value="Initial Value" 
             runat=server>

         输入一个字符串:  
      <input id="StringContents" 
             type=text 
             size=40 
             runat=server>

	<input type=image 
               id="InputImage1" 
               src="mango.jpg" 
               OnServerClick="Button1_Click" 
               runat="server">
	<span id=Span2 runat="server" />
        <p>
	<BR>
 	  输入一个字符串:  
  	    <input id="StringContents1" 
             type=text 
             size=40 
             runat=server>

        <input type=image 
               id="InputImage2" 
               src="mango.jpg"
               onmouseover="this.src='banana.jpg';"
               onmouseout="this.src='mango.jpg';"
               OnServerClick="Button2_Click"
               runat="server">
	<span id=Span3 runat="server" />
	<BR><BR>
	<span id=Span1 runat="server" />
         <p>
         </form>
</body>
</html>