CSDN博客

img bgu

[我的ASP.net学习历程]OnServerChange测试

发表于2004/9/21 19:59:00  1188人阅读

分类: [My ASP/ASP.net(C#)]

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<Script language="C#" runat="server">
void MyCode(object Sender,EventArgs e){
 DivResult.InnerHtml="'Object' is:"+Sender+"<br>"+"'EventArgs' is:"+e+"<br>";
 }
void MyListCode(Object Sender,EventArgs e){
 DivResult.InnerHtml="'Object' is:"+Sender+"<br>"+"'EventArgs' is:"+e+"<br>"+"Select value is:"+MyListBox.Value+"<br>";
 }
</Script>
<form runat="server">
 <input id="MyText" type="text" value="OriginalValue" OnServerChange="MyCode" runat="server"/>
 <select id="MyListBox" OnServerChange="MyListCode" runat="server">
  <option value="value_1">Option_1</option>
  <option value="value_2">Option_2</option>
  <option value="value_3">Option_3</option>
 </select>
 <input id="MyCheckBox" type="checkbox" OnServerChange="MyCode" runat="server"/>
 <input type="submit" value="Submit"/>
</form>
<div id="DivResult" runat="server" enableviewstate="false"/>
0 0

相关博文

我的热门文章

img
取 消
img