Effet
![insérez la description de l'image ici](https://img-blog.csdnimg.cn/d90855ff9c3a401f8d1ae35eb90ba98e.png)
code
<!-- directives -->
<% @Page Language="C#" %>
<!--函数编写 -->
<script runat="server">
private void convertoupper(object sender, EventArgs e)
{
string str = mytext.Value;
changed_text.InnerHtml = str.ToUpper();
}
</script>
<!-- Layout -->
<html>
<head>
<title> 测试 </title>
</head>
<body>
<h3> 小写转换为大写 </h3>
<form runat="server">
<input runat="server" id="mytext" type="text" />
<input runat="server" id="button1" type="submit" value="Enter..." OnServerClick="convertoupper"/>
<hr />
<h3> 结果: </h3>
<span runat="server" id="changed_text" />
</form>
</body>
</html>