在asp.net中的textbox控件中写关键词,在button控件中怎么写代码能直接显示其网页的内容呢
1个回答
展开全部
你是想直接显示textbox控件的内容吗?
<script runat="server">Sub submit(sender As Object, e As EventArgs) lbl1.Text="Your name is " & txt1.TextEnd Sub</script><html><body><form runat="server">Enter your name:<asp:TextBox id="txt1" runat="server" /><asp:Button OnClick="submit" Text="Submit" runat="server" /><p><asp:Label id="lbl1" runat="server" /></p></form></body></html>
<script runat="server">Sub submit(sender As Object, e As EventArgs) lbl1.Text="Your name is " & txt1.TextEnd Sub</script><html><body><form runat="server">Enter your name:<asp:TextBox id="txt1" runat="server" /><asp:Button OnClick="submit" Text="Submit" runat="server" /><p><asp:Label id="lbl1" runat="server" /></p></form></body></html>
追问
我想知道在button中怎样写代码实现,谢谢啦
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询